forked from jidasheng/bi-lstm-crf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
46 lines (38 loc) · 1.31 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
# encoding=utf-8
import re
from os.path import join, dirname
from setuptools import setup, find_packages
def read_file_content(filepath):
with open(join(dirname(__file__), filepath), encoding="utf8") as fp:
return fp.read()
def find_version(filepath):
content = read_file_content(filepath)
version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", content, re.M)
if version_match:
return version_match.group(1)
raise RuntimeError("Unable to find version string.")
VERSION = find_version(join('bi_lstm_crf', '__init__.py'))
long_description = read_file_content('README.md')
setup(name='bi-lstm-crf',
version=VERSION,
url='https://github.com/jidasheng/bi-lstm-crf',
author='Dasheng Ji',
author_email='[email protected]',
description='A PyTorch implementation of the BI-LSTM-CRF model',
long_description=long_description,
long_description_content_type='text/markdown',
license='MIT',
packages=find_packages(),
include_package_data=True,
install_requires=[
"tqdm",
"numpy",
"pandas",
"torch"
],
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
],
)