forked from Pinafore/qb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
73 lines (64 loc) · 1.52 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
import os
from setuptools import setup, find_packages, Command
def read(fname):
with open(os.path.join(os.path.dirname(__file__), fname)) as output:
return output.read()
requirements = [
'scipy',
'numpy',
'nltk',
'scikit-learn',
'fuzzywuzzy',
'python-Levenshtein',
'requests',
'click',
'pyfunctional',
'luigi',
'jinja2',
'boto3',
'matplotlib',
'spacy',
'pycountry',
'flask',
'dash',
'dash-renderer',
'dash-html-components',
'dash-core-components',
'plotly',
'unidecode',
'pyyaml',
'seaborn',
'awscli',
'pypandoc',
'elasticsearch-dsl',
'chainer',
'py4j',
'result'
]
class DownloadCommand(Command):
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
import nltk
nltk.download('stopwords')
nltk.download('punkt')
nltk.download('wordnet')
nltk.download('averaged_perceptron_tagger')
path = 'data/external/nltk_download_SUCCESS'
os.makedirs(os.path.dirname(path), exist_ok=True)
with open(path, 'w') as f:
f.write('Downloaded nltk: stopwords, pinkt, wordnet')
setup(
name='qb',
version='2018.05.01',
description='Quiz Bowl AI system named QANTA',
license='MIT',
long_description=read('README.md'),
packages=find_packages(),
install_requires=requirements,
include_package_data=True,
cmdclass={'download': DownloadCommand}
)