-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy pathsetup.py
67 lines (62 loc) · 2.59 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
import setuptools
from setuptools import setup, find_packages
from setuptools.command.install import install
import os
from os.path import isfile, isdir, join, dirname
class CustomInstallCommand(install):
"""
Customized setuptools install command, which installs
some NLTK data automatically
"""
def run(self):
from setuptools.command.install import install
install.run(self)
# since nltk may have just been installed
# we need to update our PYTHONPATH
import site
try:
reload(site)
except NameError:
pass
# Now we can import nltk
import nltk
# install these three resources and add them to path
install_d = {'tokenizers': 'punkt',
'corpora': 'wordnet',
'taggers': 'averaged_perceptron_tagger'}
path_to_nltk_f = nltk.__file__
nltkpath = dirname(path_to_nltk_f)
for path, name in install_d.items():
pat = join(nltkpath, path)
if not isfile(join(pat, '%s.zip' % name)) \
and not isdir(join(pat, name)):
nltk.download(name, download_dir=nltkpath)
nltk.data.path.append(nltkpath)
setup(name='corpkit',
version='2.3.8',
description='A toolkit for working with linguistic corpora',
url='http://github.com/interrogator/corpkit',
author='Daniel McDonald',
packages=['corpkit', 'corpkit.download'],
scripts=['corpkit/new_project', 'corpkit/parse',
'corpkit/corpkit', 'corpkit/corpkit.1'],
package_dir={'corpkit': 'corpkit'},
package_data={'corpkit': ['*.jar', 'corpkit/*.jar', '*.sh', 'corpkit/*.sh',
'*.ipynb', 'corpkit/*.ipynb', '*.p', 'dictionaries/*.p',
'*.py', 'dictionaries/*.py']},
author_email='[email protected]',
license='MIT',
cmdclass={'install': CustomInstallCommand,},
keywords=['corpus', 'linguistics', 'nlp'],
install_requires=["matplotlib>=1.4.3",
"nltk>=3.0.0",
"joblib",
"pandas>=0.18.1",
#"mpld3>=0.2",
"requests",
"tabview>=1.4.0",
"chardet",
"blessings>=1.6",
"traitlets>=4.1.0"],
dependency_links=['git+https://github.com/interrogator/tabview.git#egg=tabview-1.4.0',
'git+https://github.com/interrogator/tkintertable.git#egg=tkintertable-1.2'])