Skip to content

Install

Wannaphong Phatthiyaphaibun edited this page Sep 26, 2019 · 3 revisions

PyThaiNLP uses PyPI as its main distribution channel, see https://pypi.org/project/pythainlp/

Stable release

Standard installation:

$ pip install pythainlp

Development release:

$ pip install https://github.com/PyThaiNLP/pythainlp/archive/dev.zip

For some advanced functionalities, like word vector, extra packages may be needed. Install them with these options during pip install:

$ pip install pythainlp[extra1,extra2,...]

where extras can be

  • artagger (to support artagger part-of-speech tagger)*
  • attacut Fast and Reasonably Accurate Word Tokenizer for Thai (6x faster than DeepCut)
  • deepcut (to support deepcut machine-learnt tokenizer)
  • icu (for ICU support in transliteration and tokenization)
  • ipa (for International Phonetic Alphabet support in transliteration)
  • ml (to support fastai 1.0.22 ULMFiT models)
  • ner (for named-entity recognizer)
  • thai2fit (for Thai word vector)
  • thai2rom (for machine-learnt romanization)
  • full (install everything)
  • Note: standard artagger package from PyPI will not work on Windows, please pip install https://github.com/wannaphongcom/artagger/tarball/master#egg=artagger instead.

** see extras and extras_require in setup.py for package details.

Clone this wiki locally