Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions .github/workflows/pypi-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,9 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
- name: Publish a Python distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,10 @@ Make sure the same tests pass on Travis CI and AppVeyor.
#current_version = 2.3.6-dev0

bumpversion minor
#current_version = 2.3.1-dev0
#current_version = 2.3.2-dev0

bumpversion build
#current_version = 2.3.1-dev1
#current_version = 2.3.2-dev1

bumpversion major
#current_version = 3.0.0-dev0
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ PyThaiNLP เป็นไลบารีภาษาไพทอนสำหร

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


Expand Down
2 changes: 1 addition & 1 deletion README_TH.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ PyThaiNLP เป็นไลบารีภาษาไพทอนสำหร

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

ติดตามพวกเราบน [PyThaiNLP Facebook page](https://www.facebook.com/pythainlp/) เพื่อรับข่าวสารเพิ่มเติม
Expand Down
2 changes: 1 addition & 1 deletion pythainlp/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
__version__ = "2.3.1"
__version__ = "2.3.2"

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

Expand Down
3 changes: 0 additions & 3 deletions pythainlp/tokenize/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@ def clause_tokenize(doc: List[str]) -> List[List[str]]:
['และ', 'คุณ', 'เล่น', 'มือถือ'],
['ส่วน', 'น้อง', 'เขียน', 'โปรแกรม']]
"""
if not doc or not isinstance(doc, str):
return []

from pythainlp.tokenize.crfcls import segment

return segment(doc)
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 = 2.3.1
current_version = 2.3.2
commit = True
tag = True
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\-(?P<release>[a-z]+)(?P<build>\d+))?
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@

setup(
name="pythainlp",
version="2.3.1",
version="2.3.2",
description="Thai Natural Language Processing library",
long_description=readme,
long_description_content_type="text/markdown",
Expand Down
2 changes: 0 additions & 2 deletions tests/test_tokenize.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,6 @@ def test_Tokenizer(self):
self.assertEqual(_tokenizer.word_tokenize("ก"), ["ก"])

def test_clause_tokenize(self):
self.assertEqual(clause_tokenize(None), [])
self.assertEqual(clause_tokenize(""), [])
self.assertIsNotNone(clause_tokenize(["ฉัน", "ทดสอบ"]))
self.assertIsInstance(clause_tokenize(["ฉัน", "ทดสอบ"]), list)
self.assertIsNotNone(crfcls.segment(["ฉัน", "ทดสอบ"]))
Expand Down