Skip to content

Commit 6550a5f

Browse files
authored
Merge pull request #1199 from bact/rm-trailing-whitespaces
Remove trailing whitespaces
2 parents 20fc24b + 30c30d3 commit 6550a5f

9 files changed

Lines changed: 60 additions & 61 deletions

File tree

.pyup.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# autogenerated pyup.io config file
1+
# autogenerated pyup.io config file
22
# see https://pyup.io/docs/configuration/ for all available options
33

44
schedule: ''

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ This will create distribution packages in the `dist/` directory.
161161

162162
bump-my-version bump release
163163
#current_version = 2.3.3-beta0
164-
164+
165165
bump-my-version bump release
166166
#current_version = 2.3.3
167167

docs/api/soundex.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ References
9090

9191
.. [#metasound] Snae & Brückner. (2009). `Novel Phonetic Name Matching Algorithm with a Statistical Ontology for Analyzing Names Given in Accordance with Thai Astrology <https://pdfs.semanticscholar.org/3983/963e87ddc6dfdbb291099aa3927a0e3e4ea6.pdf>`_.
9292
93-
.. [#udom83] Wannee Udompanich (1983). `String searching for Thai alphabet using Soundex compression technique <http://cuir.car.chula.ac.th/handle/123456789/48471>`_. Master Thesis. Chulalongkorn University, Thailand. วรรณี อุดมพาณิชย์. `การใช้หลักคำพ้องเสียง เพื่อค้นหาชุดอักขระภาษาไทยที่ออกเสียงเหมือนกัน <http://cuir.car.chula.ac.th/handle/123456789/48471>`_. วิทยานิพนธ์ (วท.ม.)--จุฬาลงกรณ์มหาวิทยาลัย, 2526.
93+
.. [#udom83] Wannee Udompanich (1983). `String searching for Thai alphabet using Soundex compression technique <http://cuir.car.chula.ac.th/handle/123456789/48471>`_. Master Thesis. Chulalongkorn University, Thailand. วรรณี อุดมพาณิชย์. `การใช้หลักคำพ้องเสียง เพื่อค้นหาชุดอักขระภาษาไทยที่ออกเสียงเหมือนกัน <http://cuir.car.chula.ac.th/handle/123456789/48471>`_. วิทยานิพนธ์ (วท.ม.)--จุฬาลงกรณ์มหาวิทยาลัย, 2526.
9494
9595
.. [#lk82] Vichit Lorchirachoonkul. 1982. `A Thai soundex system <https://doi.org/10.1016/0306-4573(82)90003-6>`_. Information Processing & Management, 18(5):243–255. วิชิต หล่อจีระชุณห์กุล และ เจริญ คุวินทร์พันธุ์. `โปรแกรมการสืบค้นคำไทยตามเสียงอ่าน (Thai Soundex) <http://guru.sanook.com/1520/>`_.
9696

docs/api/tokenize.rst

Lines changed: 39 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -8,40 +8,39 @@ The :mod:`pythainlp.tokenize` module contains a comprehensive set of functions a
88
Modules
99
-------
1010

11-
1211
.. autofunction:: sent_tokenize
1312
:noindex:
14-
13+
1514
Splits Thai text into sentences. This function identifies sentence boundaries, which is essential for text segmentation and analysis.
1615

1716
.. autofunction:: paragraph_tokenize
1817
:noindex:
19-
18+
2019
Segments text into paragraphs, which can be valuable for document-level analysis or summarization.
2120

2221
.. autofunction:: subword_tokenize
2322
:noindex:
24-
23+
2524
Tokenizes text into subwords, which can be helpful for various NLP tasks, including subword embeddings.
2625

2726
.. autofunction:: syllable_tokenize
2827
:noindex:
29-
28+
3029
Divides text into syllables, allowing you to work with individual Thai language phonetic units.
3130

3231
.. autofunction:: word_tokenize
3332
:noindex:
34-
33+
3534
Splits text into words. This function is a fundamental tool for Thai language text analysis.
3635

3736
.. autofunction:: word_detokenize
3837
:noindex:
39-
38+
4039
Reverses the tokenization process, reconstructing text from tokenized units. Useful for text generation tasks.
4140

4241
.. autoclass:: Tokenizer
4342
:members:
44-
43+
4544
The `Tokenizer` class is a versatile tool for customizing tokenization processes and managing tokenization models. It provides various methods and attributes to fine-tune tokenization according to your specific needs.
4645

4746
.. autoclass:: display_cell_tokenize
@@ -55,119 +54,119 @@ Sentence level
5554
--------------
5655

5756
**crfcut**
58-
57+
5958
.. automodule:: pythainlp.tokenize.crfcut
6059
:members:
61-
60+
6261
A tokenizer that operates at the sentence level using Conditional Random Fields (CRF). It is suitable for segmenting text into sentences accurately.
6362

6463
**thaisumcut**
65-
64+
6665
.. automodule:: pythainlp.tokenize.thaisumcut
6766
:members:
68-
67+
6968
A sentence tokenizer based on a maximum entropy model. It's a great choice for sentence boundary detection in Thai text.
7069

7170
Word level
7271
----------
7372

7473
**attacut**
75-
74+
7675
.. automodule:: pythainlp.tokenize.attacut
7776
:members:
78-
77+
7978
A tokenizer designed for word-level segmentation. It provides accurate word boundary detection in Thai text.
8079

8180
**deepcut**
82-
81+
8382
.. automodule:: pythainlp.tokenize.deepcut
8483
:members:
85-
84+
8685
Utilizes deep learning techniques for word segmentation, achieving high accuracy and performance.
8786

8887
**multi_cut**
89-
88+
9089
.. automodule:: pythainlp.tokenize.multi_cut
9190
:members:
92-
91+
9392
An ensemble tokenizer that combines multiple tokenization strategies for improved word segmentation.
9493

9594
**nlpo3**
96-
95+
9796
.. automodule:: pythainlp.tokenize.nlpo3
9897
:members:
99-
98+
10099
A word tokenizer based on the NLPO3 model. It offers advanced word boundary detection and is suitable for various NLP tasks.
101100

102101
**longest**
103-
102+
104103
.. automodule:: pythainlp.tokenize.longest
105104
:members:
106-
105+
107106
A tokenizer that identifies word boundaries by selecting the longest possible words in a text.
108107

109108
**pyicu**
110-
109+
111110
.. automodule:: pythainlp.tokenize.pyicu
112111
:members:
113-
112+
114113
An ICU-based word tokenizer offering robust support for Thai text segmentation.
115114

116115
**nercut**
117-
116+
118117
.. automodule:: pythainlp.tokenize.nercut
119118
:members:
120-
119+
121120
A tokenizer optimized for Named Entity Recognition (NER) tasks, ensuring accurate tokenization for entity recognition.
122121

123122
**sefr_cut**
124-
123+
125124
.. automodule:: pythainlp.tokenize.sefr_cut
126125
:members:
127-
126+
128127
An advanced word tokenizer for segmenting Thai text, with a focus on precision.
129128

130129
**oskut**
131-
130+
132131
.. automodule:: pythainlp.tokenize.oskut
133132
:members:
134-
133+
135134
A tokenizer that uses a pre-trained model for word segmentation. It's a reliable choice for general-purpose text analysis.
136135

137136
**newmm (Default)**
138-
137+
139138
.. automodule:: pythainlp.tokenize.newmm
140139
:members:
141-
140+
142141
The default word tokenization engine that provides a balance between accuracy and efficiency for most use cases.
143142

144143
Subword level
145144
-------------
146145

147146
**tcc**
148-
147+
149148
.. automodule:: pythainlp.tokenize.tcc
150149
:members:
151-
150+
152151
Tokenizes text into Thai Character Clusters (TCCs), a subword level representation.
153152

154153
**tcc+**
155-
154+
156155
.. automodule:: pythainlp.tokenize.tcc_p
157156
:members:
158-
157+
159158
A subword tokenizer that includes additional rules for more precise subword segmentation.
160159

161160
**etcc**
162-
161+
163162
.. automodule:: pythainlp.tokenize.etcc
164163
:members:
165-
164+
166165
Enhanced Thai Character Clusters (eTCC) tokenizer for subword-level analysis.
167166

168167
**han_solo**
169-
168+
170169
.. automodule:: pythainlp.tokenize.han_solo
171170
:members:
172-
171+
173172
A subword tokenizer specialized for Han characters and mixed scripts, suitable for various text processing scenarios.

docs/api/tools.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,25 +9,25 @@ Modules
99

1010
.. autofunction:: get_full_data_path
1111
:noindex:
12-
12+
1313
Retrieves the full path to the PyThaiNLP data directory. This function is essential for internal data management, enabling PyThaiNLP to locate resources efficiently.
1414

1515
.. autofunction:: get_pythainlp_data_path
1616
:noindex:
17-
17+
1818
Obtains the path to the PyThaiNLP data directory. This function is useful for accessing the library's data resources for internal processes.
1919

2020
.. autofunction:: get_pythainlp_path
2121
:noindex:
22-
22+
2323
Returns the path to the PyThaiNLP library directory. This function is vital for PyThaiNLP's internal operations and library management.
2424

2525
.. autofunction:: safe_print
2626
:noindex:
2727

2828
.. autofunction:: pythainlp.tools.misspell.misspell
2929
:noindex:
30-
30+
3131
This module appears to be related to handling misspellings within PyThaiNLP. While not explicitly documented here, it likely provides functionality for identifying and correcting misspelled words, which can be crucial for text preprocessing and language processing tasks.
3232

3333
The `pythainlp.tools` module contains these functions, which are mainly intended for PyThaiNLP's internal workings. While they may not be directly utilized by external users, they play a pivotal role in ensuring the smooth operation of the library. Understanding the purpose of these functions can be valuable for contributors and developers working on PyThaiNLP, as it sheds light on the internal mechanisms and data management within the library.

docs/api/translate.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,40 +9,40 @@ Modules
99

1010
.. autoclass:: Translate
1111
:members:
12-
12+
1313
The `Translate` class is the central component of the module, offering a unified interface for various translation tasks. It acts as a coordinator, directing translation requests to specific language pairs and models.
1414

1515
.. autoclass:: word_translate
1616
:members:
1717

1818
.. autofunction:: pythainlp.translate.en_th.download_model_all
1919
:noindex:
20-
20+
2121
This function facilitates the download of all available English to Thai translation models. It ensures that the required models are accessible for translation tasks, enhancing the usability of the module.
2222

2323
.. autoclass:: pythainlp.translate.en_th.EnThTranslator
2424
:members:
25-
25+
2626
The `EnThTranslator` class specializes in translating text from English to Thai. It offers a range of methods for translating sentences and text, enabling accurate and meaningful translations between these languages.
2727

2828
.. autoclass:: pythainlp.translate.en_th.ThEnTranslator
2929
:members:
30-
30+
3131
Conversely, the `ThEnTranslator` class focuses on translating text from Thai to English. It provides functionality for translating Thai text into English, contributing to effective language understanding and communication.
3232

3333
.. autoclass:: pythainlp.translate.zh_th.ThZhTranslator
3434
:members:
35-
35+
3636
The `ThZhTranslator` class specializes in translating text from Thai to Chinese (Simplified). This class is valuable for bridging language gaps between these two languages, promoting cross-cultural communication.
3737

3838
.. autoclass:: pythainlp.translate.zh_th.ZhThTranslator
3939
:members:
40-
40+
4141
The `ZhThTranslator` class is designed for translating text from Chinese (Simplified) to Thai. It assists in making content accessible to Thai-speaking audiences by converting Chinese text into Thai.
4242

4343
.. autoclass:: pythainlp.translate.th_fr.ThFrTranslator
4444
:members:
45-
45+
4646
Lastly, the `ThFrTranslator` class specializes in translating text from Thai to French. It serves as a tool for expanding language accessibility and promoting content sharing in French-speaking communities.
4747

4848
.. The `pythainlp.translate` module extends the language processing capabilities of PyThaiNLP, offering machine translation functionality for various language pairs. Whether you need to translate text between English and Thai, Thai and Chinese, or Thai and French, this module provides the necessary tools and classes to facilitate seamless language conversion. The `Translate` class acts as the central coordinator, while language-specific classes ensure accurate and meaningful translations for diverse linguistic scenarios.

docs/api/transliterate.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,22 +29,22 @@ Modules
2929

3030
.. autoclass:: pythainlp.transliterate.wunsen.WunsenTransliterate
3131
:members:
32-
32+
3333
The `WunsenTransliterate` class represents a transliteration engine known as "Wunsen." It offers specific transliteration methods for rendering Thai text into a phonetic English format.
3434

3535
Transliteration Engines
3636
-----------------------
3737

3838
**thai2rom**
39-
39+
4040
.. autofunction:: pythainlp.transliterate.thai2rom.romanize
41-
41+
4242
The `thai2rom` engine specializes in transliterating Thai text into romanized form. It's particularly useful for rendering Thai words accurately in an English phonetic format.
4343

4444
**royin**
45-
45+
4646
.. autofunction:: pythainlp.transliterate.royin.romanize
47-
47+
4848
The `royin` engine focuses on transliterating Thai text into English characters. It provides an alternative approach to transliteration, ensuring accurate representation of Thai words.
4949

5050
**Transliterate Engines**

docs/api/ulmfit.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Modules
99

1010
.. autoclass:: ThaiTokenizer
1111
:members:
12-
12+
1313
The `ThaiTokenizer` class is a critical component of ULMFiT, designed for tokenizing Thai text effectively. Tokenization is the process of breaking down text into individual tokens, and this class allows you to do so with precision and accuracy.
1414

1515
.. autofunction:: document_vector

docs/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ PyThaiNLP documentation
77
=====================================
88
.. figure:: ./images/logo.png
99
:scale: 50 %
10-
10+
1111
PyThaiNLP is a Python library for Thai natural language processing (NLP).
1212

1313
Website: `PyThaiNLP.github.io <https://pythainlp.org/>`_

0 commit comments

Comments
 (0)