forked from proycon/pynlpl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
executable file
·68 lines (59 loc) · 2.81 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
#! /usr/bin/env python
# -*- coding: utf8 -*-
from __future__ import print_function
import os
import sys
from setuptools import setup, find_packages
if os.path.dirname(__file__) != "":
os.chdir(os.path.dirname(__file__))
if not os.path.exists('pynlpl'):
print("Preparing build",file=sys.stderr)
if os.path.exists('build'):
os.system('rm -Rf build')
os.mkdir('build')
os.chdir('build')
if not os.path.exists('pynlpl'): os.mkdir('pynlpl')
os.system('cp -Rpdf ../* pynlpl/ 2> /dev/null')
os.system('mv -f pynlpl/setup.py pynlpl/setup.cfg .')
os.system('cp -f pynlpl/README .')
#Do not include unfininished WIP modules:
os.system('rm -f pynlpl/formats/colibri.py pynlpl/formats/alpino.py pynlpl/foliaprocessing.py pynlpl/grammar.py')
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
entry_points = {}
if sys.version > '3':
entry_points = { 'console_scripts': [
'pynlpl-classencoder = pynlpl.tools.classencoder:main',
'pynlpl-classdecoder = pynlpl.tools.classdecoder:main',
'pynlpl-computepmi = pynlpl.tools.computepmi:main',
'pynlpl-sampler = pynlpl.tools.sampler:main',
'pynlpl-makefreqlist = pynlpl.tools.freqlist:main',
]
}
setup(
name = "PyNLPl",
version = "0.6.9", #edit version in __init__.py as well!
author = "Maarten van Gompel",
author_email = "[email protected]",
description = ("PyNLPl, pronounced as 'pineapple', is a Python library for Natural Language Processing. It contains various modules useful for common, and less common, NLP tasks. PyNLPl can be used for example the computation of n-grams, frequency lists and distributions, language models. There are also more complex data types, such as Priority Queues, and search algorithms, such as Beam Search."),
license = "GPL",
keywords = "nlp computational_linguistics search ngrams language_models linguistics toolkit",
url = "https://github.com/proycon/pynlpl",
packages=['pynlpl','pynlpl.clients','pynlpl.lm','pynlpl.formats','pynlpl.mt','pynlpl.tools'],
long_description=read('README'),
classifiers=[
"Development Status :: 4 - Beta",
"Topic :: Text Processing :: Linguistic",
"Programming Language :: Python :: 2.6",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Operating System :: POSIX",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
],
#include_package_data=True,
#package_data = {'': ['*.wsgi','*.js','*.xsl','*.gif','*.png','*.xml','*.html','*.jpg','*.svg','*.rng'] },
install_requires=['lxml >= 2.2','httplib2 >= 0.6','numpy'],
entry_points = entry_points
)