Skip to content

Commit 462a83e

Browse files
authored
Merge pull request #789 from PyThaiNLP/4.0
PyThaiNLP 4.0 Released!
2 parents 1dd81c8 + 494f5ae commit 462a83e

File tree

16 files changed

+50
-23
lines changed

16 files changed

+50
-23
lines changed

.github/workflows/macos-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ jobs:
7474
conda install -c conda-forge icu
7575
conda install -c conda-forge pyicu
7676
if [ -f docker_requirements.txt ]; then pip install -r docker_requirements.txt; fi
77-
pip install deepcut
77+
pip install deepcut tltk
7878
pip install .[full]
7979
python -m nltk.downloader omw-1.4
8080
if: matrix.os != 'self-hosted'

.github/workflows/pypi-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- name: Install dependencies
2222
run: |
2323
python -m pip install --upgrade pip
24-
pip install deepcut
24+
pip install deepcut tltk
2525
pip install -r https://raw.githubusercontent.com/PyThaiNLP/pythainlp/dev/docker_requirements.txt
2626
pip install pythainlp[full]
2727
python -m nltk.downloader omw-1.4

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
python -m pip install --upgrade pip
3232
pip install pytest coverage coveralls
3333
if [ -f docker_requirements.txt ]; then pip install -r docker_requirements.txt; fi
34-
pip install deepcut
34+
pip install deepcut tltk
3535
pip install .[full]
3636
python -m nltk.downloader omw-1.4
3737
- name: Test

.github/workflows/windows-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
python -m pip install -r docker_requirements.txt
5252
python -m pip install .[full]
5353
python -m nltk.downloader omw-1.4
54-
python -m pip install spacy deepcut
54+
python -m pip install spacy deepcut tltk
5555
- name: Test
5656
shell: powershell
5757
env:

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ PyThaiNLP เป็นไลบารีภาษาไพทอนสำหร
2323
2424
| Version | Description | Status |
2525
|:------:|:--:|:------:|
26-
| [3.1](https://github.com/PyThaiNLP/pythainlp/releases) | Stable | [Change Log](https://github.com/PyThaiNLP/pythainlp/issues/643) |
27-
| [`dev`](https://github.com/PyThaiNLP/pythainlp/tree/dev) | Release Candidate for 4.0 | [Change Log](https://github.com/PyThaiNLP/pythainlp/issues/714) |
26+
| [4.0](https://github.com/PyThaiNLP/pythainlp/releases) | Stable | [Change Log](https://github.com/PyThaiNLP/pythainlp/issues/714) |
27+
| [`dev`](https://github.com/PyThaiNLP/pythainlp/tree/dev) | Release Candidate for 4.1 | [Change Log](https://github.com/PyThaiNLP/pythainlp/issues/788) |
2828

2929

3030
## Getting Started

README_TH.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ PyThaiNLP เป็นไลบารีภาษาไพทอนสำหร
2020
2121
| รุ่น | คำอธิบาย | สถานะ |
2222
|:------:|:--:|:------:|
23-
| [3.1](https://github.com/PyThaiNLP/pythainlp/releases) | Stable | [Change Log](https://github.com/PyThaiNLP/pythainlp/issues/643) |
24-
| [`dev`](https://github.com/PyThaiNLP/pythainlp/tree/dev) | Release Candidate for 4.0 | [Change Log](https://github.com/PyThaiNLP/pythainlp/issues/714) |
23+
| [4.0](https://github.com/PyThaiNLP/pythainlp/releases) | Stable | [Change Log](https://github.com/PyThaiNLP/pythainlp/issues/714) |
24+
| [`dev`](https://github.com/PyThaiNLP/pythainlp/tree/dev) | Release Candidate for 4.1 | [Change Log](https://github.com/PyThaiNLP/pythainlp/issues/788) |
2525

2626
ติดตามพวกเราบน [PyThaiNLP Facebook page](https://www.facebook.com/pythainlp/) เพื่อรับข่าวสารเพิ่มเติม
2727

SECURITY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
| Version | Supported |
66
| ------- | ------------------ |
7+
| 4.0.x | :white_check_mark: |
78
| 3.1.x | :white_check_mark: |
89
| 3.0.x | :x: |
910
| 2.3.x | :x: |

docs/notes/installation.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ where ``extras`` can be
2828
- ``wordnet`` (to support wordnet)
2929
- ``spell`` (to support phunspell & symspellpy)
3030
- ``generate`` (to support text generate with umlfit or thai2fit)
31-
- ``tltk`` (to support tltk)
3231
- ``textaugment`` (to support text augmentation)
3332
- ``oskut`` (to support OSKUT)
3433
- ``nlpo3`` (to support nlpo3 engine)

pythainlp/khavee/core.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
# limitations under the License.
1515
from typing import List, Union
1616
from pythainlp.tokenize import subword_tokenize
17+
from pythainlp.util import sound_syllable
1718

1819

1920
class KhaveeVerifier:

pythainlp/spell/tltk.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@
2121
* \
2222
https://pypi.org/project/tltk/
2323
"""
24-
from tltk.nlp import spell_candidates
24+
try:
25+
from tltk.nlp import spell_candidates
26+
except ImportError:
27+
raise ImportError("Not found tltk! Please install tltk by pip install tltk")
2528
from typing import List
2629

2730

0 commit comments

Comments
 (0)