Skip to content

Commit

Permalink
Fixed import crf #901
Browse files Browse the repository at this point in the history
  • Loading branch information
wannaphong committed Feb 10, 2024
1 parent 5685c83 commit d7a3b79
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 8 deletions.
3 changes: 2 additions & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@

| Version | Supported |
| ------- | ------------------ |
| 5.0.x | :white_check_mark: |
| 4.0.x | :white_check_mark: |
| 3.1.x | :white_check_mark: |
| 3.1.x | :x: |
| 3.0.x | :x: |
| 2.3.x | :x: |
| 2.2.x | :x: |
Expand Down
2 changes: 1 addition & 1 deletion pythainlp/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
# SPDX-FileCopyrightText: Copyright 2016-2024 PyThaiNLP Project
# SPDX-License-Identifier: Apache-2.0
__version__ = "5.0.0"
__version__ = "5.0.1"

thai_consonants = "กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรลวศษสหฬอฮ" # 44 chars

Expand Down
9 changes: 6 additions & 3 deletions pythainlp/util/pronounce.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@


kv = KhaveeVerifier()
all_thai_words_dict = [
i for i in list(thai_words()) if len(syllable_tokenize(i)) == 1
]
all_thai_words_dict = None


def rhyme(word: str) -> List[str]:
Expand All @@ -29,7 +27,12 @@ def rhyme(word: str) -> List[str]:
print(rhyme("จีบ"))
# output: ['กลีบ', 'กีบ', 'ครีบ', ...]
"""
global all_thai_words_dict
list_sumpus = []
if all_thai_words_dict == None:
all_thai_words_dict = [
i for i in list(thai_words()) if len(syllable_tokenize(i)) == 1
]
for i in all_thai_words_dict:
if kv.is_sumpus(word, i) and i != word:
list_sumpus.append(i)
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 5.0.0
current_version = 5.0.1
commit = True
tag = True
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\-(?P<release>[a-z]+)(?P<build>\d+))?
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@

setup(
name="pythainlp",
version="5.0.0",
version="5.0.1",
description="Thai Natural Language Processing library",
long_description=readme,
long_description_content_type="text/markdown",
Expand Down Expand Up @@ -210,7 +210,7 @@
],
},
project_urls={
"Documentation": "https://pythainlp.github.io/docs/4.0/",
"Documentation": "https://pythainlp.github.io/docs/5.0/",
"Tutorials": "https://pythainlp.github.io/tutorials/",
"Source Code": "https://github.com/PyThaiNLP/pythainlp",
"Bug Tracker": "https://github.com/PyThaiNLP/pythainlp/issues",
Expand Down

0 comments on commit d7a3b79

Please sign in to comment.