Skip to content

Commit 5c48bb0

Browse files
committed
Remove nlpo3 from compact
Cannot build on Python 3.12 and 3.13
1 parent e6ea7e2 commit 5c48bb0

File tree

7 files changed

+15
-15
lines changed

7 files changed

+15
-15
lines changed

CONTRIBUTING.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ so it may be a good idea to familiarize yourself with it.
4444

4545
- We use the famous [gitflow](http://nvie.com/posts/a-successful-git-branching-model/)
4646
to manage our branches.
47-
- When you create pull requests on GitHub, Github Actions and AppVeyor will run tests
47+
- When you create pull requests on GitHub, GitHub Actions will run tests
4848
and several checks automatically. Click the "Details" link at the end of
4949
each check to see what needs to be fixed.
5050

@@ -66,7 +66,7 @@ To run unit tests locally together with code coverage test:
6666
(from main `pythainlp/` directory)
6767

6868
```sh
69-
coverage run -m unittest discover
69+
coverage run -m unittest tests.core
7070
```
7171

7272
See code coverage test:
@@ -75,13 +75,16 @@ See code coverage test:
7575
coverage report
7676
```
7777

78-
Generate code coverage test in HTML (files will be available in `htmlcov/` directory):
78+
Generate code coverage test in HTML
79+
(files will be available in `htmlcov/` directory):
7980

8081
```sh
8182
coverage html
8283
```
8384

84-
Make sure the tests pass on both Github Actions and AppVeyor.
85+
Make sure the tests pass on GitHub Actions.
86+
87+
See more in [tests/README.md](./tests/README.md)
8588

8689
## Releasing
8790

README_TH.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@
22
<img src="https://avatars0.githubusercontent.com/u/32934255?s=200&v=4"/>
33
<h1>PyThaiNLP: Thai Natural Language Processing in Python</h1>
44
<a href="https://pypi.python.org/pypi/pythainlp"><img alt="pypi" src="https://img.shields.io/pypi/v/pythainlp.svg"/></a>
5-
<a href="https://www.python.org/downloads/release/python-370/"><img alt="Python 3.7" src="https://img.shields.io/badge/python-3.7-blue.svg"/></a>
5+
<a href="https://www.python.org/downloads/"><img alt="Python 3.9" src="https://img.shields.io/badge/python-3.9-blue.svg"/></a>
66
<a href="https://opensource.org/licenses/Apache-2.0"><img alt="License" src="https://img.shields.io/badge/License-Apache%202.0-blue.svg"/></a>
77
<a href="https://pepy.tech/project/pythainlp"><img alt="Download" src="https://pepy.tech/badge/pythainlp/month"/></a>
8-
<a href="https://ci.appveyor.com/project/wannaphongcom/pythainlp-9y1ch"><img alt="Build status" src="https://ci.appveyor.com/api/projects/status/9g3mfcwchi8em40x?svg=true"/></a>
98
<a href="https://coveralls.io/github/PyThaiNLP/pythainlp?branch=dev"><img alt="Coverage Status" src="https://coveralls.io/repos/github/PyThaiNLP/pythainlp/badge.svg?branch=dev"/></a>
109
<a href="https://www.codacy.com/app/pythainlp/pythainlp_2"><img alt="Codacy Badge" src="https://api.codacy.com/project/badge/Grade/cb946260c87a4cc5905ca608704406f7"/></a>
1110
<a href="https://app.fossa.io/projects/git%2Bgithub.com%2FPyThaiNLP%2Fpythainlp"><img alt="FOSSA Status" src="https://app.fossa.io/api/projects/git%2Bgithub.com%2FPyThaiNLP%2Fpythainlp.svg?type=shield"/></a>
@@ -51,6 +50,7 @@ PyThaiNLP มีความสามารถพื้นฐานสำหร
5150
- Thai datetime formatting (`thai_strftime`)
5251
- Thai-English keyboard misswitched fix (`eng_to_thai`, `thai_to_eng`)
5352
- Command-line interface for basic functions, like tokenization and pos tagging (run `thainlp` in your shell)
53+
5454
</details>
5555

5656
อ่านรายละเอียดได้ที่ [tutorials](https://pythainlp.org/tutorials)
@@ -82,6 +82,7 @@ pip install pythainlp[extra1,extra2,...]
8282
<summary>รายการสำหรับติดตั้งผ่าน <code>extras</code></summary>
8383

8484
- `full` (ติดตั้งทุกอย่าง)
85+
- `compact` (ติดตั้งไลบารีชุดเล็กที่ทดสอบแล้วว่าไม่ตีกันเองและติดตั้งได้ในทุกระบบปฏิบัติการ)
8586
- `attacut` (เพื่อสนับสนุน attacut ซึ่งเป็นตัวตัดคำที่ทำงานได้รวดเร็วและมีประสิทธิภาพ)
8687
- `benchmarks` (สำหรับ [word tokenization benchmarking](tokenization-benchmark.md))
8788
- `icu` (สำหรับการรองรับ ICU หรือ International Components for Unicode ในการถอดเสียงเป็นอักษรและการตัดแบ่งคำ)
@@ -90,6 +91,7 @@ pip install pythainlp[extra1,extra2,...]
9091
- `thai2fit` (สำหรับ Thai word vector)
9192
- `thai2rom` (สำหรับการถอดอักษรไทยเป็นอักษรโรมัน)
9293
- `wordnet` (สำหรับ Thai WordNet API)
94+
9395
</details>
9496

9597
สำหรับโมดูลที่ต้องการ สามารถดูรายละเอียดได้ที่ตัวแปร `extras` ใน [`setup.py`](https://github.com/PyThaiNLP/pythainlp/blob/dev/setup.py).

requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
PyYAML>=5.4.1
2-
nlpo3>=1.3.0
32
numpy>=1.22
43
pyicu>=2.3
54
python-crfsuite>=0.9.7

setup.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@
103103
# Compact dependencies, this one matches requirements.txt
104104
"compact": [
105105
"PyYAML>=5.4.1",
106-
"nlpo3>=1.3.0",
107106
"numpy>=1.22",
108107
"pyicu>=2.3",
109108
"python-crfsuite>=0.9.7",

tests/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Tests are categorized into three groups: core, compact, and extra.
1616
- Run `unittest tests.compact`
1717
- Test a limited set of functionalities that rely on a stable and small subset
1818
of optional dependencies specified in `requirements.txt`.
19-
- These dependencies are `PyYAML`, `nlpo3`, `numpy`, `pyicu`,
19+
- These dependencies are `PyYAML`, `numpy`, `pyicu`,
2020
`python-crfsuite`, and `requests`.
2121
- Test with the latest two stable Python versions.
2222

tests/compact/testc_tokenize.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,3 @@ def test_icu(self):
8888

8989
def test_word_tokenize_icu(self):
9090
self.assertIsNotNone(word_tokenize(TEXT_1, engine="icu"))
91-
92-
93-
class WordTokenizeNlpO3TestCase(unittest.TestCase):
94-
def test_word_tokenize_nlpo3(self):
95-
self.assertIsNotNone(word_tokenize(TEXT_1, engine="nlpo3"))

tests/extra/testx_tokenize.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,9 @@ def test_nercut(self):
306306
self.assertIsNotNone(word_tokenize("ทดสอบ", engine="nercut"))
307307

308308

309-
309+
class WordTokenizeNlpO3TestCase(unittest.TestCase):
310+
def test_word_tokenize_nlpo3(self):
311+
self.assertIsNotNone(word_tokenize(TEXT_1, engine="nlpo3"))
310312

311313

312314
class WordTokenizeOSKutTestCase(unittest.TestCase):

0 commit comments

Comments
 (0)