pythainlp
Thai Natural Language Processing library
Decision gist · record as of 2026-08-14
Yes. PyThaiNLP is actively maintained, has no known vulnerabilities, carries a permissive Apache-2.0 license, and installs with minimal friction. It is the standard choice for Thai NLP in Python and covers essential tasks like tokenization, tagging, and correction. Install it if you need to process Thai text; the base package is lightweight and the optional extras allow you to add machine translation or WordNet support as needed.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.9 or later.
- By default, PyThaiNLP downloads linguistic data to ~/pythainlp-data on first use; set PYTHAINLP_OFFLINE=1 or PYTHAINLP_DATA to control this behavior.
- Low install friction with only two runtime dependencies (importlib-resources and tzdata).
License · maintenance · safety
Apache-2.0 (permissive) — Licensed under Apache-2.0 (permissive), with data and models covered by CC0-1.0 and CC-BY-4.0. This permits commercial use and modification with minimal restrictions.
last release 2026-08-14 (0 days) · last repo commit 2026-08-14 · 1,148 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 1,425,870 downloads/mo, #3,915 on PyPI
Alternatives
Verify before relying
pip install pythainlp
import pythainlp
from pythainlp.tokenize import word_tokenize
text = "สวัสดีชาวโลก"
tokens = word_tokenize(text)- Whether optional extras (translate, wordnet, full) introduce significant additional dependencies or compatibility concerns.
- Performance characteristics and memory footprint when processing large Thai text corpora.
- Availability and quality of pre-trained models for tasks beyond basic tokenization and tagging.
What it is and what it does
PyThaiNLP is a Python library for Thai natural language processing, providing standard linguistic analysis tools tailored to Thai language characteristics. It includes sentence, word, and subword segmentation; part-of-speech tagging; transliteration and IPA conversion; spelling correction; and utilities like soundex, collation, and Thai-specific formatting functions. The library ships with built-in Thai character sets, word lists, and stop words, plus a command-line interface.
The package depends on importlib-resources and tzdata at runtime and is designed to work with Python 3.9 and later. It downloads linguistic data and models on demand to a local directory (configurable via environment variables), with options for offline and read-only modes. Installation is straightforward with optional extras for machine translation and WordNet support, though the base install covers core tokenization and tagging tasks.
Use it for
- Tokenize Thai text into sentences, words, or subwords for downstream NLP pipelines.
- Perform part-of-speech tagging on Thai documents for grammatical analysis.
- Correct Thai spelling errors and generate spelling suggestions for user input.
- Transliterate Thai text to romanized or IPA form for linguistic study or accessibility.
- Build Thai language applications with built-in stop words, character sets, and collation utilities.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
PyThaiNLP is actively maintained, has no known vulnerabilities, carries a permissive Apache-2.0 license, and installs with minimal friction. It is the standard choice for Thai NLP in Python and covers essential tasks like tokenization, tagging, and correction. Install it if you need to process Thai text; the base package is lightweight and the optional extras allow you to add machine translation or WordNet support as needed.
Install
pythainlp on PyPI
Before you install
Low install friction with only two runtime dependencies (importlib-resources and tzdata). The package is actively maintained with a recent release and no known vulnerabilities.
Requires Python 3.9 or later. By default, PyThaiNLP downloads linguistic data to ~/pythainlp-data on first use; set PYTHAINLP_OFFLINE=1 or PYTHAINLP_DATA to control this behavior.
License in practice
Licensed under Apache-2.0 (permissive), with data and models covered by CC0-1.0 and CC-BY-4.0. This permits commercial use and modification with minimal restrictions.
Quickstart
pip install pythainlp
import pythainlp
from pythainlp.tokenize import word_tokenize
text = "สวัสดีชาวโลก"
tokens = word_tokenize(text)
Verify before relying
- Whether optional extras (translate, wordnet, full) introduce significant additional dependencies or compatibility concerns.
- Performance characteristics and memory footprint when processing large Thai text corpora.
- Availability and quality of pre-trained models for tasks beyond basic tokenization and tagging.
Package facts
| License | Apache-2.0 permissive |
| Python support | Supports the current Python release >=3.9 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 2 packagesimportlib-resourcestzdata |
| Maintenance | Actively maintained 0 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,425,870 / month, #3,915 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersNatural Language :: ThaiProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9Topic :: Scientific/Engineering :: Artificial IntelligenceTopic :: Software Development :: LocalizationTopic :: Text ProcessingTopic :: Text Processing :: GeneralTopic :: Text Processing :: Linguistic |
Evidence: pythainlp-5.3.7-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “thai language processing”
- pythainlpPyThaiNLP provides Thai-language natural language processing tools…
- sea-g2pConverts text to phonemes for Vietnamese, Thai, and Indonesian with…
- englishEnglish is a utility library providing English language processing…
Give your agent the search over MCP, or paste the wish link into any chat.
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to call 100+ LLM providers (OpenAI, Anthropic, Gemini, Bedrock, Azure, and others) using OpenAI-compatible API format, available as both a Python SDK and a self-hosted AI Gateway proxy server.
Install it if you need to work with multiple LLM providers or want to centralize LLM routing in your organization.
Client library and CLI tool for downloading, uploading, and managing models, datasets, and repositories on the Hugging Face Hub platform.
Install it if you work with Hugging Face Hub models or datasets.
LangChain provides a framework for building agents and LLM-powered applications by composing language models, tools, and memory through a unified API that abstracts over multiple model providers.
hf-xet provides chunk-based deduplication and efficient file transfer for the Hugging Face Hub, enabling faster uploads and downloads of large files with local disk caching.
Tokenizers converts raw text into token sequences for NLP models, with support for training custom vocabularies and using pre-built tokenizers (BPE, WordPiece) optimized for speed via Rust.
Transformers provides a unified framework for loading, fine-tuning, and running state-of-the-art pretrained models across text, vision, audio, video, and multimodal tasks using PyTorch, JAX, or TensorFlow.
Install it if you need to run or train any transformer-based model for NLP, vision, audio, or multimodal tasks.
See also nltk · urduhack · konlpy · textblob · indic-nlp-library · symspellpy · sea-g2p · english · jieba3k · pyenchant