Skip to content

Commit ef3503a

Browse files
authored
Merge pull request #610 from PyThaiNLP/fixed-#609
PyThaiNLP 2.3.2
2 parents 82e4dd0 + 4da3fda commit ef3503a

File tree

9 files changed

+12
-18
lines changed

9 files changed

+12
-18
lines changed

.github/workflows/pypi-publish.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,9 @@ jobs:
2222
run: |
2323
python -m pip install --upgrade pip
2424
pip install setuptools wheel twine
25-
- name: Build and publish
26-
env:
27-
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
28-
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
29-
run: |
3025
python setup.py sdist bdist_wheel
31-
twine upload dist/*
26+
- name: Publish a Python distribution to PyPI
27+
uses: pypa/gh-action-pypi-publish@release/v1
28+
with:
29+
user: __token__
30+
password: ${{ secrets.PYPI_API_TOKEN }}

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,10 @@ Make sure the same tests pass on Travis CI and AppVeyor.
108108
#current_version = 2.3.6-dev0
109109
110110
bumpversion minor
111-
#current_version = 2.3.1-dev0
111+
#current_version = 2.3.2-dev0
112112
113113
bumpversion build
114-
#current_version = 2.3.1-dev1
114+
#current_version = 2.3.2-dev1
115115
116116
bumpversion major
117117
#current_version = 3.0.0-dev0

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ PyThaiNLP เป็นไลบารีภาษาไพทอนสำหร
2323

2424
| Version | Description | Status |
2525
|:------:|:--:|:------:|
26-
| [2.3.1](https://github.com/PyThaiNLP/pythainlp/releases) | Stable | [Change Log](https://github.com/PyThaiNLP/pythainlp/issues/445) |
26+
| [2.3.2](https://github.com/PyThaiNLP/pythainlp/releases) | Stable | [Change Log](https://github.com/PyThaiNLP/pythainlp/issues/445) |
2727
| [`dev`](https://github.com/PyThaiNLP/pythainlp/tree/dev) | Release Candidate for 2.4 | [Change Log](https://github.com/PyThaiNLP/pythainlp/issues/545) |
2828

2929

README_TH.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ PyThaiNLP เป็นไลบารีภาษาไพทอนสำหร
2222

2323
| รุ่น | คำอธิบาย | สถานะ |
2424
|:------:|:--:|:------:|
25-
| [2.3.1](https://github.com/PyThaiNLP/pythainlp/releases) | Stable | [Change Log](https://github.com/PyThaiNLP/pythainlp/issues/445) |
25+
| [2.3.2](https://github.com/PyThaiNLP/pythainlp/releases) | Stable | [Change Log](https://github.com/PyThaiNLP/pythainlp/issues/445) |
2626
| [`dev`](https://github.com/PyThaiNLP/pythainlp/tree/dev) | Release Candidate for 2.4 | [Change Log](https://github.com/PyThaiNLP/pythainlp/issues/545) |
2727

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

pythainlp/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*- coding: utf-8 -*-
2-
__version__ = "2.3.1"
2+
__version__ = "2.3.2"
33

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

pythainlp/tokenize/core.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,6 @@ def clause_tokenize(doc: List[str]) -> List[List[str]]:
3636
['และ', 'คุณ', 'เล่น', 'มือถือ'],
3737
['ส่วน', 'น้อง', 'เขียน', 'โปรแกรม']]
3838
"""
39-
if not doc or not isinstance(doc, str):
40-
return []
41-
4239
from pythainlp.tokenize.crfcls import segment
4340

4441
return segment(doc)

setup.cfg

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

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979

8080
setup(
8181
name="pythainlp",
82-
version="2.3.1",
82+
version="2.3.2",
8383
description="Thai Natural Language Processing library",
8484
long_description=readme,
8585
long_description_content_type="text/markdown",

tests/test_tokenize.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,6 @@ def test_Tokenizer(self):
202202
self.assertEqual(_tokenizer.word_tokenize("ก"), ["ก"])
203203

204204
def test_clause_tokenize(self):
205-
self.assertEqual(clause_tokenize(None), [])
206-
self.assertEqual(clause_tokenize(""), [])
207205
self.assertIsNotNone(clause_tokenize(["ฉัน", "ทดสอบ"]))
208206
self.assertIsInstance(clause_tokenize(["ฉัน", "ทดสอบ"]), list)
209207
self.assertIsNotNone(crfcls.segment(["ฉัน", "ทดสอบ"]))

0 commit comments

Comments
 (0)