forked from dongrixinyu/JioNLP
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
80 lines (66 loc) · 2.2 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
74
75
76
77
78
79
80
# -*- coding=utf-8 -*-
"""
# library: jionlp
# author: dongrixinyu
# license: Apache License 2.0
# Email: [email protected]
# github: https://github.com/dongrixinyu/JioNLP
# description: Preprocessing tool for Chinese NLP
"""
import os
import re
from setuptools import setup, find_packages
DIR_PATH = os.path.dirname(os.path.abspath(__file__))
LONG_DOC = '''
==================================== JioNLP ====================================
中文 NLP 数据预处理工具包,完成训练 NLP 模型前后的数据预处理,如文本数据增强、文本清洗、特定
信息抽取、数据集概况分析、模型加速、相关模型任务 baseline、词典等。
# 安装:
$ git clone https://github.com/dongrixinyu/JioNLP
$ cd ./JioNLP
$ pip install .
# 导入:
>>> import jionlp as jio
'''
__version__ = ''
with open(os.path.join(DIR_PATH, 'README.md'),
'r', encoding='utf-8') as f:
readme_lines = f.readlines()
version_pattern = re.compile('badge/version-(\d\.\d+\.\d+)-')
for line in readme_lines:
result = version_pattern.search(line)
if result is not None:
__version__ = result.group(1)
LONG_DOC = '\n'.join(readme_lines)
__name__ = 'jionlp'
__author__ = "dongrixinyu"
__copyright__ = "Copyright 2020, dongrixinyu"
__credits__ = list()
__license__ = "Apache License 2.0"
__maintainer__ = "dongrixinyu"
__email__ = "[email protected]"
__url__ = 'https://github.com/dongrixinyu/JioNLP'
__description__ = 'Chinese NLPreprocessing & Parsing'
with open(os.path.join(DIR_PATH, 'requirements.txt'),
'r', encoding='utf-8') as f:
requirements = f.readlines()
setup(name=__name__,
version=__version__,
url=__url__,
author=__author__,
author_email=__email__,
description=__description__,
long_description=LONG_DOC,
long_description_content_type='text/markdown',
license=__license__,
py_modules=list(),
packages=find_packages(),
include_package_data=True,
install_requires=requirements,
entry_points={
'console_scripts': [
'jio_help = jionlp.util:help',
]
},
test_suite='nose.collector',
tests_require=['nose'])