Practical overview
When it fits
Use PyThaiNLP when a Python workflow needs Thai linguistic analysis, especially sentence, word or subword segmentation, or when its documented optional dependency groups match the project’s needs.
Who it is for
- Python developers processing Thai-language text.
- Researchers and teams preparing Thai text for downstream NLP workflows.
Documented uses
- Segment Thai text into sentences, words or subwords.
- Install additional documented dependency groups for translation or WordNet support.
- Control where PyThaiNLP stores data and whether automatic corpus downloads are disabled.
Requirements & limits
The README documents installation through pip. It identifies the library license as Apache-2.0 and the data and models as CC0-1.0 and CC-BY-4.0.
- The
compactextra is described as a stable, small subset of dependencies. - The
fullextra includes all optional dependencies and may introduce conflicts. - Data downloads default to
~/pythainlp-data;PYTHAINLP_DATAcan change the directory. PYTHAINLP_OFFLINE=1disables automatic corpus downloads, but explicit download calls still work.- The code and associated data/models have distinct license terms.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Install PyThaiNLP with selected extras
Install the library with a chosen set of optional dependencies.
Before you start
- Python environment with pip
Steps
For the base installation, run the command below.
pip install pythainlpTo include optional features, use the documented form the command below, replacing the placeholders with selected extras such as
compact,translateorwordnet.pip install "pythainlp[extra1,extra2,...]"
Expected outcome
PyThaiNLP is installed with the base package or the selected optional dependency groups.
Guide limitations
- The
fullextra installs all optional dependencies and may introduce conflicts. - The README directs users to the installation documentation for the complete list of extras.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 13 October 2026
- Original website title
- GitHub - PyThaiNLP/pythainlp: Thai natural language processing in Python · GitHub · Official homepage title · retained in its source language

