|
2 | 2 |
|
3 | 3 | from setuptools import find_packages, setup |
4 | 4 |
|
5 | | -with open("README-pypi.md", "r", encoding="utf-8") as readme_file: |
6 | | - readme = readme_file.read() |
| 5 | +readme = """ |
| 6 | + |
7 | 7 |
|
8 | | -with open("requirements.txt", "r", encoding="utf-8") as f: |
9 | | - requirements = f.read().splitlines() |
| 8 | +PyThaiNLP is a Python library for Thai natural language processing. |
| 9 | +The library provides functions like word tokenization, part-of-speech tagging, |
| 10 | +transliteration, soundex generation, and spell checking. |
| 11 | +
|
| 12 | +## Install |
| 13 | +
|
| 14 | +For stable version: |
| 15 | +
|
| 16 | +```sh |
| 17 | +pip install pythainlp |
| 18 | +``` |
| 19 | +
|
| 20 | +Some functionalities, like word vector, required extra packages. |
| 21 | +See https://github.com/PyThaiNLP/pythainlp for installation options. |
| 22 | +
|
| 23 | +**Note for Windows**: `marisa-trie` wheels can be obtained from |
| 24 | +https://www.lfd.uci.edu/~gohlke/pythonlibs/#marisa-trie |
| 25 | +Install it with pip, for example: `pip install marisa_trie‑xxx.whl` |
| 26 | +""" |
| 27 | + |
| 28 | +requirements = [ |
| 29 | + "dill>=0.3.0,<1", |
| 30 | + "marisa-trie>=0.7.5,<1", |
| 31 | + "nltk>=3.4.5,<4", |
| 32 | + "requests>=2.22.0,<3", |
| 33 | + "tinydb>=3.13.0,<4", |
| 34 | + "tqdm>=4.35.0,<5", |
| 35 | +] |
10 | 36 |
|
11 | 37 | extras = { |
12 | | - "artagger": ["artagger"], |
13 | | - "attacut": ["attacut"], |
14 | | - "deepcut": ["deepcut", "keras", "tensorflow"], |
15 | | - "icu": ["pyicu"], |
16 | | - "ipa": ["epitran"], |
17 | | - "ssg": ["ssg"], |
18 | | - "ml": ["keras", "numpy", "torch"], |
19 | | - "ner": ["sklearn-crfsuite"], |
20 | | - "thai2fit": ["emoji", "gensim", "numpy"], |
21 | | - "thai2rom": ["torch", "numpy"], |
22 | | - "benchmarks": ["numpy", "pandas"], |
| 38 | + "artagger": ["artagger>=0.1.0.3"], |
| 39 | + "attacut": ["attacut>=1.0.2"], |
| 40 | + "benchmarks": ["numpy>=1.17.2", "pandas>=0.25.1"], |
| 41 | + "deepcut": ["deepcut>=0.6.1.0", "keras>=2.3.0", "tensorflow>=1.14.0"], |
| 42 | + "icu": ["pyicu>=2.3.1"], |
| 43 | + "ipa": ["epitran>=1.1"], |
| 44 | + "ml": ["keras>=2.3.0", "numpy>=1.17.2", "torch>=1.2.0"], |
| 45 | + "ner": ["sklearn-crfsuite>=0.3.6"], |
| 46 | + "ssg": ["ssg>=0.0.4"], |
| 47 | + "thai2fit": ["emoji>0.5.4", "gensim>=3.8.0", "numpy>=1.17.2"], |
| 48 | + "thai2rom": ["torch>=1.2.0", "numpy>=1.17.2"], |
23 | 49 | "full": [ |
24 | | - "artagger", |
25 | | - "attacut", |
26 | | - "deepcut", |
27 | | - "epitran", |
28 | | - "gensim", |
29 | | - "keras", |
30 | | - "numpy", |
31 | | - "pyicu", |
32 | | - "sklearn-crfsuite", |
33 | | - "tensorflow", |
34 | | - "torch", |
35 | | - "ssg", |
36 | | - "emoji", |
37 | | - "pandas", |
| 50 | + "artagger>=0.1.0.3", |
| 51 | + "attacut>=1.0.2", |
| 52 | + "deepcut>=0.6.1.0", |
| 53 | + "epitran>=1.1", |
| 54 | + "gensim>=3.8.0", |
| 55 | + "keras>=2.3.0", |
| 56 | + "numpy>=1.17.2", |
| 57 | + "pyicu>=2.3.1", |
| 58 | + "sklearn-crfsuite>=0.3.6", |
| 59 | + "tensorflow>=1.14.0", |
| 60 | + "torch>=1.2.0", |
| 61 | + "ssg>=0.0.4", |
| 62 | + "emoji>=0.5.4", |
| 63 | + "pandas>=0.25.1", |
38 | 64 | ], |
39 | 65 | } |
40 | 66 |
|
|
0 commit comments