-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
67 lines (59 loc) · 1.91 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
from setuptools import setup, find_packages
from os import path
import re
def packagefile(*relpath):
return path.join(path.dirname(__file__), *relpath)
def read(*relpath):
with open(packagefile(*relpath)) as f:
return f.read()
def get_version(*relpath):
match = re.search(
r'''^__version__ = ['"]([^'"]*)['"]''',
read(*relpath),
re.M
)
if not match:
raise RuntimeError('Unable to find version string.')
return match.group(1)
setup(
name='mosestokenizer',
version=get_version('src', 'mosestokenizer', '__init__.py'),
description='Wrappers for several pre-processing scripts from the Moses'
' toolkit.',
long_description=read('README.rst'),
url='https://bitbucket.org/luismsgomes/mosestokenizer',
author='Luís Gomes',
author_email='[email protected]',
license='LGPLv2',
# See https://pypi.python.org/pypi?%3Aaction=list_classifiers
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'Topic :: Text Processing :: Linguistic',
'License :: OSI Approved :: GNU Lesser General Public License v2'
' or later (LGPLv2+)',
'Programming Language :: Python :: 3.5',
],
keywords='text tokenization pre-processing',
install_requires=[
"docopt",
"openfile",
"toolwrapper",
],
packages=find_packages('src'),
package_dir={'': 'src'},
package_data={
'mosestokenizer': [
'*.perl',
'nonbreaking_prefixes/*.*'
],
},
entry_points={
'console_scripts': [
'moses-tokenizer=mosestokenizer.tokenizer:main',
'moses-detokenizer=mosestokenizer.detokenizer:main',
'moses-punct-normalizer=mosestokenizer.punctnormalizer:main',
'moses-sent-splitter=mosestokenizer.sentsplitter:main'
],
},
)