|
10 | 10 |
|
11 | 11 | from setuptools import find_packages, setup |
12 | 12 |
|
| 13 | +PYYAML = "PyYAML>=5.4.1" |
| 14 | +PANDAS = "pandas>=0.24" |
| 15 | +NUMPY = "numpy>=1.22" |
| 16 | + |
13 | 17 | LONG_DESC = """ |
14 | 18 |  |
15 | 19 |
|
|
41 | 45 | requirements = [ |
42 | 46 | "backports.zoneinfo; python_version<'3.9'", |
43 | 47 | "requests>=2.31", |
| 48 | + PYYAML, |
| 49 | + PANDAS, |
| 50 | + NUMPY, |
44 | 51 | "tzdata; sys_platform == 'win32'", |
45 | 52 | ] |
46 | 53 |
|
47 | 54 | extras = { |
48 | 55 | "abbreviation": ["khamyo>=0.2.0"], |
49 | 56 | "attacut": ["attacut>=1.0.6"], |
50 | | - "benchmarks": ["PyYAML>=5.4.1", "numpy>=1.22", "pandas>=0.24"], |
| 57 | + "benchmarks": [PYYAML, NUMPY, PANDAS], |
51 | 58 | "coreference_resolution": [ |
52 | 59 | "fastcoref>=2.1.5", |
53 | 60 | "spacy>=3.0", |
|
66 | 73 | "generate": ["fastai<2.0"], |
67 | 74 | "icu": ["pyicu>=2.3"], |
68 | 75 | "ipa": ["epitran>=1.1"], |
69 | | - "ml": ["numpy>=1.22", "torch>=1.0.0"], |
| 76 | + "ml": [NUMPY, "torch>=1.0.0"], |
70 | 77 | "mt5": ["sentencepiece>=0.1.91", "transformers>=4.6.0"], |
71 | 78 | "nlpo3": ["nlpo3>=1.3.1"], |
72 | | - "onnx": ["numpy>=1.22", "onnxruntime>=1.10.0", "sentencepiece>=0.1.91"], |
| 79 | + "onnx": [NUMPY, "onnxruntime>=1.10.0", "sentencepiece>=0.1.91"], |
73 | 80 | "oskut": ["oskut>=1.3"], |
74 | 81 | "sefr_cut": ["sefr_cut>=1.1"], |
75 | 82 | "spacy_thai": ["spacy_thai>=0.7.1"], |
76 | 83 | "spell": ["phunspell>=0.1.6", "symspellpy>=6.7.6"], |
77 | 84 | "ssg": ["ssg>=0.0.8"], |
78 | 85 | "textaugment": ["bpemb", "gensim>=4.0.0"], |
79 | 86 | "thai_nner": ["thai_nner"], |
80 | | - "thai2fit": ["emoji>=0.5.1", "gensim>=4.0.0", "numpy>=1.22"], |
81 | | - "thai2rom": ["numpy>=1.22", "torch>=1.0.0"], |
| 87 | + "thai2fit": ["emoji>=0.5.1", "gensim>=4.0.0", NUMPY], |
| 88 | + "thai2rom": [NUMPY, "torch>=1.0.0"], |
82 | 89 | "translate": [ |
83 | 90 | 'fairseq>=0.10.0,<0.13;python_version<"3.11"', |
84 | 91 | 'fairseq-fixed==0.12.3.1,<0.13;python_version>="3.11"', |
|
94 | 101 | ], |
95 | 102 | "wangchanberta": ["sentencepiece>=0.1.91", "transformers>=4.6.0"], |
96 | 103 | "wangchanglm": [ |
97 | | - "pandas>=0.24", |
| 104 | + PANDAS, |
98 | 105 | "sentencepiece>=0.1.91", |
99 | 106 | "transformers>=4.6.0", |
100 | 107 | ], |
|
105 | 112 | "wunsen": ["wunsen>=0.0.1"], |
106 | 113 | # Compact dependencies, this one matches requirements.txt |
107 | 114 | "compact": [ |
108 | | - "PyYAML>=5.4.1", |
| 115 | + PYYAML, |
109 | 116 | "nlpo3>=1.3.1", |
110 | | - "numpy>=1.22", |
| 117 | + NUMPY, |
111 | 118 | "pyicu>=2.3", |
112 | 119 | "python-crfsuite>=0.9.7", |
113 | 120 | ], |
114 | 121 | # Full dependencies |
115 | 122 | "full": [ |
116 | | - "PyYAML>=5.4.1", |
| 123 | + PYYAML, |
117 | 124 | "attacut>=1.0.4", |
118 | 125 | "bpemb>=0.3.2", |
119 | 126 | "emoji>=0.5.1", |
|
126 | 133 | "khamyo>=0.2.0", |
127 | 134 | "nlpo3>=1.3.1", |
128 | 135 | "nltk>=3.3", |
129 | | - "numpy>=1.22", |
| 136 | + NUMPY, |
130 | 137 | "onnxruntime>=1.10.0", |
131 | 138 | "oskut>=1.3", |
132 | | - "pandas>=0.24", |
| 139 | + PANDAS, |
133 | 140 | "panphon>=0.20.0", |
134 | 141 | "phunspell>=0.1.6", |
135 | 142 | "pyicu>=2.3", |
|
0 commit comments