Skip to content

Commit bfd69b8

Browse files
committed
v1.0.7
1 parent 020e169 commit bfd69b8

3 files changed

Lines changed: 32 additions & 10 deletions

File tree

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,17 @@
3232
+ RE2(Simple-Effective-Text-Matching)
3333

3434
# Usages
35+
可以选择通过pip进行安装并使用(如下),或者直接下载源码到本地,集成到项目中:
36+
```
37+
pip3 install text-sim
38+
```
39+
3540
```
3641
1:examples目录下有不同模型对应的 preprocess/train/evalute代码,可自行修改
3742
2:如下示例从examples中引入actuator方法,准备好对应的模型配置文件即可执行
3843
3:examples目录下的inference.py为训练好的模型推理代码
44+
4:主体代码放在sim下,TensorFlow和Pytorch两个版本分开存放,引用方式基本保持一致
45+
5:相关工具包括word2vec、tokenizer、data_format统一放在sim的tools下
3946
```
4047

4148
### TF-IDF

setup.py

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,38 @@
11
#! -*- coding: utf-8 -*-
22

3+
import codecs
4+
import pathlib
35
from setuptools import setup
46
from setuptools import find_packages
57

8+
here = pathlib.Path(__file__).parent.resolve()
9+
long_description = (here / "README.md").read_text(encoding="utf-8")
10+
with codecs.open("requirements.txt", "r", "utf8") as reader:
11+
install_requires = list(map(lambda x: x.strip(), reader.readlines()))
12+
613
setup(
7-
name='text-sim',
8-
version='0.0.1',
9-
description='an elegant text-sim',
10-
long_description='text-sim: https://github.com/DengBoCong/sim',
14+
name="text-sim",
15+
version="1.0.7",
16+
description="Chinese text similarity calculation package of Tensorflow/Pytorch",
17+
long_description=long_description,
1118
long_description_content_type="text/markdown",
12-
license='MIT License',
13-
url='https://github.com/DengBoCong/sim',
14-
author='DengBoCong',
15-
author_email='bocongdeng@gmail.com',
16-
install_requires=['scikit-learn>=0.23.2', 'numpy>=1.19.2'],
19+
license="MIT License",
20+
url="https://github.com/DengBoCong/text-similarity",
21+
author="DengBoCong",
22+
author_email="bocongdeng@gmail.com",
23+
install_requires=install_requires,
1724
packages=find_packages(),
1825
classifiers=[
1926
"Programming Language :: Python :: 3",
27+
"Programming Language :: Python :: 3.7",
28+
"Programming Language :: Python :: 3.8",
2029
"License :: OSI Approved :: MIT License",
2130
"Operating System :: OS Independent",
2231
],
32+
keywords="similarity, tensorflow, pytorch, classification",
33+
project_urls={
34+
"Bug Reports": "https://github.com/DengBoCong/text-similarity/issues",
35+
"Funding": "https://pypi.org/project/text-sim/",
36+
"Source": "https://github.com/DengBoCong/text-similarity",
37+
},
2338
)

sim/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#! -*- coding: utf-8 -*-
22

33
name = "sim"
4-
__version__ = "0.0.1"
4+
__version__ = "1.0.7"

0 commit comments

Comments
 (0)