Skip to content

Commit 92da9e0

Browse files
committed
update readme
1 parent 7671f0e commit 92da9e0

File tree

3 files changed

+46
-46
lines changed

3 files changed

+46
-46
lines changed

README-pypi.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ PyThaiNLP includes Thai word tokenizers, transliterators, soundex converters, pa
1111
## What's new in 2.0 ?
1212

1313
- Terminate Python 2 support. Remove all Python 2 compatibility code.
14-
- Improved `word_tokenize` ("newmm" and "mm" engine) and `dict_word_tokenize`
15-
- Improved Part-Of-Speech tagging
14+
- Improved `word_tokenize` ("newmm" and "mm" engine), a `custom_dict` dictionary can be provided
15+
- Improved `pos_tag` Part-Of-Speech tagging
1616
- New `NorvigSpellChecker` spell checker class, which can be initialized with custom dictionary.
1717
- New `thai2fit` (replacing `thai2vec`, upgrade ULMFiT-related code to fastai 1.0)
1818
- Updated ThaiNER to 1.0

README.md

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@ PyThaiNLP is a Python package for text processing and linguistic analysis, simil
2626

2727
## Capabilities
2828

29-
- Convenient character and word classes, like Thai consonants (```pythainlp.thai_consonants```), vowels (```pythainlp.thai_vowels```), digits (```pythainlp.thai_digits```), and stop words (```pythainlp.corpus.thai_stopwords```) -- comparable to constants like ```string.letters```, ```string.digits```, and ```string.punctuation```
30-
- Thai word segmentation (```word_tokenize```), including subword segmentation based on Thai Character Cluster (```subword_tokenize```)
31-
- Thai transliteration (```transliterate```)
32-
- Thai part-of-speech taggers (```pos_tag```)
33-
- Read out number to Thai words (```bahttext```, ```num_to_thaiword```)
34-
- Thai collation (sort by dictionoary order) (```collate```)
35-
- Thai-English keyboard misswitched fix (```eng_to_thai```, ```thai_to_eng```)
36-
- Thai spelling suggestion and correction (```spell``` and ```correct```)
37-
- Thai soundex (```lk82```, ```udom83```, ```metasound```)
29+
- Convenient character and word classes, like Thai consonants (`pythainlp.thai_consonants`), vowels (`pythainlp.thai_vowels`), digits (`pythainlp.thai_digits`), and stop words (`pythainlp.corpus.thai_stopwords`) -- comparable to constants like `string.letters`, `string.digits`, and `string.punctuation`
30+
- Thai word segmentation (`word_tokenize`), including subword segmentation based on Thai Character Cluster (`subword_tokenize`)
31+
- Thai transliteration (`transliterate`)
32+
- Thai part-of-speech taggers (`pos_tag`)
33+
- Read out number to Thai words (`bahttext`, `num_to_thaiword`)
34+
- Thai collation (sort by dictionoary order) (`collate`)
35+
- Thai-English keyboard misswitched fix (`eng_to_thai`, `thai_to_eng`)
36+
- Thai spelling suggestion and correction (`spell` and `correct`)
37+
- Thai soundex (`soundex`) with three engines (`lk82`, `udom83`, `metasound`)
3838
- Thai WordNet wrapper
3939
- and much more - see examples in [PyThaiNLP Get Started notebook](https://github.com/PyThaiNLP/pythainlp/blob/dev/notebooks/pythainlp-get-started.ipynb).
4040

@@ -62,20 +62,20 @@ For some advanced functionalities, like word vector, extra packages may be neede
6262
$ pip install pythainlp[extra1,extra2,...]
6363
```
6464

65-
where ```extras``` can be
66-
- ```artagger``` (to support artagger part-of-speech tagger)*
67-
- ```deepcut``` (to support deepcut machine-learnt tokenizer)
68-
- ```icu``` (for ICU, International Components for Unicode, support in transliteration and tokenization)
69-
- ```ipa``` (for IPA, International Phonetic Alphabet, support in transliteration)
70-
- ```ml``` (to support fastai 1.0.22 ULMFiT models)
71-
- ```ner``` (for named-entity recognizer)
72-
- ```thai2fit``` (for Thai word vector)
73-
- ```thai2rom``` (for machine-learnt romanization)
74-
- ```full``` (install everything)
65+
where `extras` can be
66+
- `artagger` (to support artagger part-of-speech tagger)*
67+
- `deepcut` (to support deepcut machine-learnt tokenizer)
68+
- `icu` (for ICU, International Components for Unicode, support in transliteration and tokenization)
69+
- `ipa` (for IPA, International Phonetic Alphabet, support in transliteration)
70+
- `ml` (to support fastai 1.0.22 ULMFiT models)
71+
- `ner` (for named-entity recognizer)
72+
- `thai2fit` (for Thai word vector)
73+
- `thai2rom` (for machine-learnt romanization)
74+
- `full` (install everything)
7575

76-
* Note: standard ```artagger``` package from PyPI will not work on Windows, please ```pip install https://github.com/wannaphongcom/artagger/tarball/master#egg=artagger``` instead.
76+
* Note: standard `artagger` package from PyPI will not work on Windows, please ```pip install https://github.com/wannaphongcom/artagger/tarball/master#egg=artagger``` instead.
7777

78-
** see ```extras``` and ```extras_require``` in [```setup.py```](https://github.com/PyThaiNLP/pythainlp/blob/dev/setup.py) for package details.
78+
** see `extras` and `extras_require` in [`setup.py`](https://github.com/PyThaiNLP/pythainlp/blob/dev/setup.py) for package details.
7979

8080
## Documentation
8181

@@ -114,15 +114,15 @@ PyThaiNLP เป็นไลบารีภาษาไพทอนเพื่
114114

115115
## ความสามารถ
116116

117-
- ชุดค่าคงที่ตัวอักษระและคำไทยที่เรียกใช้ได้สะดวก เช่น พยัญชนะ (```pythainlp.thai_consonants```), สระ (```pythainlp.thai_vowels```), ตัวเลขไทย (```pythainlp.thai_digits```), และ stop word (```pythainlp.corpus.thai_stopwords```) -- เหมือนกับค่าคงที่อย่าง ```string.letters```, ```string.digits```, และ ```string.punctuation```
118-
- ตัดคำภาษาไทย (```word_tokenize```) และรองรับการตัดระดับต่ำกว่าคำโดยใช้ Thai Character Clusters (```subword_tokenize```)
119-
- ถอดเสียงภาษาไทยเป็นอักษรละตินและสัทอักษร (```transliterate```)
120-
- ระบุชนิดคำ (part-of-speech) ภาษาไทย (```pos_tag```)
121-
- อ่านตัวเลขเป็นข้อความภาษาไทย (```bahttext```, ```num_to_thaiword```)
122-
- เรียงลำดับคำตามพจนานุกรมไทย (```collate```)
123-
- แก้ไขปัญหาการพิมพ์ลืมเปลี่ยนภาษา (```eng_to_thai```, ```thai_to_eng```)
124-
- ตรวจคำสะกดผิดในภาษาไทย (```spell```, ```correct```)
125-
- soundex ภาษาไทย (```lk82```, ```udom83```, ```metasound```)
117+
- ชุดค่าคงที่ตัวอักษระและคำไทยที่เรียกใช้ได้สะดวก เช่น พยัญชนะ (`pythainlp.thai_consonants`), สระ (`pythainlp.thai_vowels`), ตัวเลขไทย (`pythainlp.thai_digits`), และ stop word (`pythainlp.corpus.thai_stopwords`) -- เหมือนกับค่าคงที่อย่าง `string.letters`, `string.digits`, และ `string.punctuation`
118+
- ตัดคำภาษาไทย (`word_tokenize`) และรองรับการตัดระดับต่ำกว่าคำโดยใช้ Thai Character Clusters (`subword_tokenize`)
119+
- ถอดเสียงภาษาไทยเป็นอักษรละตินและสัทอักษร (`transliterate`)
120+
- ระบุชนิดคำ (part-of-speech) ภาษาไทย (`pos_tag`)
121+
- อ่านตัวเลขเป็นข้อความภาษาไทย (`bahttext`, `num_to_thaiword`)
122+
- เรียงลำดับคำตามพจนานุกรมไทย (`collate`)
123+
- แก้ไขปัญหาการพิมพ์ลืมเปลี่ยนภาษา (`eng_to_thai`, `thai_to_eng`)
124+
- ตรวจคำสะกดผิดในภาษาไทย (`spell`, `correct`)
125+
- soundex ภาษาไทย (`soundex`) 3 วิธีการ (`lk82`, `udom83`, `metasound`)
126126
- Thai WordNet wrapper
127127
- และอื่น ๆ ดูตัวอย่างได้ใน [PyThaiNLP Get Started notebook](https://github.com/PyThaiNLP/pythainlp/blob/dev/notebooks/pythainlp-get-started.ipynb)
128128

@@ -146,20 +146,20 @@ $ pip install https://github.com/PyThaiNLP/pythainlp/archive/dev.zip
146146
$ pip install pythainlp[extra1,extra2,...]
147147
```
148148

149-
โดยที่ ```extras``` คือ
150-
- ```artagger``` (สำหรับตัวติดป้ายกำกับชนิดคำ artagger)*
151-
- ```deepcut``` (สำหรับตัวตัดคำ deepcut)
152-
- ```icu``` (สำหรับการถอดตัวสะกดเป็นสัทอักษรและการตัดคำด้วย ICU)
153-
- ```ipa``` (สำหรับการถอดตัวสะกดเป็นสัทอักษรสากล (IPA))
154-
- ```ml``` (สำหรับการรองรับโมเดล ULMFiT)
155-
- ```ner``` (สำหรับการติดป้ายชื่อเฉพาะ (named-entity))
156-
- ```thai2fit``` (สำหรับ word vector)
157-
- ```thai2rom``` (สำหรับการถอดตัวสะกดเป็นอักษรละติน)
158-
- ```full``` (ติดตั้งทุกอย่าง)
149+
โดยที่ `extras` คือ
150+
- `artagger` (สำหรับตัวติดป้ายกำกับชนิดคำ artagger)*
151+
- `deepcut` (สำหรับตัวตัดคำ deepcut)
152+
- `icu` (สำหรับการถอดตัวสะกดเป็นสัทอักษรและการตัดคำด้วย ICU)
153+
- `ipa` (สำหรับการถอดตัวสะกดเป็นสัทอักษรสากล (IPA))
154+
- `ml` (สำหรับการรองรับโมเดล ULMFiT)
155+
- `ner` (สำหรับการติดป้ายชื่อเฉพาะ (named-entity))
156+
- `thai2fit` (สำหรับ word vector)
157+
- `thai2rom` (สำหรับการถอดตัวสะกดเป็นอักษรละติน)
158+
- `full` (ติดตั้งทุกอย่าง)
159159

160-
* หมายเหตุ: แพคเกจ ```artagger``` มาตรฐานจาก PyPI อาจมีปัญหาการถอดรหัสข้อความบน Windows กรุณาติดตั้ง artagger รุ่นแก้ไขด้วยคำสั่ง ```pip install https://github.com/wannaphongcom/artagger/tarball/master#egg=artagger``` แทน ก่อนจะติดตั้ง PyThaiNLP
160+
* หมายเหตุ: แพคเกจ `artagger` มาตรฐานจาก PyPI อาจมีปัญหาการถอดรหัสข้อความบน Windows กรุณาติดตั้ง artagger รุ่นแก้ไขด้วยคำสั่ง ```pip install https://github.com/wannaphongcom/artagger/tarball/master#egg=artagger``` แทน ก่อนจะติดตั้ง PyThaiNLP
161161

162-
** นักพัฒนาสามารถดู ```extras``` และ ```extras_require``` ใน [```setup.py```](https://github.com/PyThaiNLP/pythainlp/blob/dev/setup.py) สำหรับรายละเอียดแพคเกจของเสริม
162+
** สามารถดู `extras` และ `extras_require` ใน [`setup.py`](https://github.com/PyThaiNLP/pythainlp/blob/dev/setup.py) สำหรับรายละเอียดแพคเกจของเสริม
163163

164164
## เอกสารการใช้งาน
165165

docs/api/tokenize.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ The :class:`pythainlp.tokenize` contains multiple functions for tokenizing a chu
88
Modules
99
-------
1010

11+
.. autofunction:: sent_tokenize
1112
.. autofunction:: word_tokenize
12-
.. autofunction:: dict_word_tokenize
13+
.. autofunction:: syllable_tokenize
1314
.. autofunction:: subword_tokenize
14-
.. autofunction:: sent_tokenize
1515
.. autofunction:: dict_trie
1616
.. autoclass:: Tokenizer
1717
:members: word_tokenize, set_tokenize_engine

0 commit comments

Comments
 (0)