Skip to content

Commit d7a3b79

Browse files
committed
Fixed import crf #901
1 parent 5685c83 commit d7a3b79

File tree

5 files changed

+12
-8
lines changed

5 files changed

+12
-8
lines changed

Diff for: SECURITY.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@
44

55
| Version | Supported |
66
| ------- | ------------------ |
7+
| 5.0.x | :white_check_mark: |
78
| 4.0.x | :white_check_mark: |
8-
| 3.1.x | :white_check_mark: |
9+
| 3.1.x | :x: |
910
| 3.0.x | :x: |
1011
| 2.3.x | :x: |
1112
| 2.2.x | :x: |

Diff for: pythainlp/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# -*- coding: utf-8 -*-
22
# SPDX-FileCopyrightText: Copyright 2016-2024 PyThaiNLP Project
33
# SPDX-License-Identifier: Apache-2.0
4-
__version__ = "5.0.0"
4+
__version__ = "5.0.1"
55

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

Diff for: pythainlp/util/pronounce.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@
99

1010

1111
kv = KhaveeVerifier()
12-
all_thai_words_dict = [
13-
i for i in list(thai_words()) if len(syllable_tokenize(i)) == 1
14-
]
12+
all_thai_words_dict = None
1513

1614

1715
def rhyme(word: str) -> List[str]:
@@ -29,7 +27,12 @@ def rhyme(word: str) -> List[str]:
2927
print(rhyme("จีบ"))
3028
# output: ['กลีบ', 'กีบ', 'ครีบ', ...]
3129
"""
30+
global all_thai_words_dict
3231
list_sumpus = []
32+
if all_thai_words_dict == None:
33+
all_thai_words_dict = [
34+
i for i in list(thai_words()) if len(syllable_tokenize(i)) == 1
35+
]
3336
for i in all_thai_words_dict:
3437
if kv.is_sumpus(word, i) and i != word:
3538
list_sumpus.append(i)

Diff for: setup.cfg

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 5.0.0
2+
current_version = 5.0.1
33
commit = True
44
tag = True
55
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\-(?P<release>[a-z]+)(?P<build>\d+))?

Diff for: setup.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@
161161

162162
setup(
163163
name="pythainlp",
164-
version="5.0.0",
164+
version="5.0.1",
165165
description="Thai Natural Language Processing library",
166166
long_description=readme,
167167
long_description_content_type="text/markdown",
@@ -210,7 +210,7 @@
210210
],
211211
},
212212
project_urls={
213-
"Documentation": "https://pythainlp.github.io/docs/4.0/",
213+
"Documentation": "https://pythainlp.github.io/docs/5.0/",
214214
"Tutorials": "https://pythainlp.github.io/tutorials/",
215215
"Source Code": "https://github.com/PyThaiNLP/pythainlp",
216216
"Bug Tracker": "https://github.com/PyThaiNLP/pythainlp/issues",

0 commit comments

Comments
 (0)