Text to Vector Tool, encode text
Project description
text2vec
text2vec, text to vector tool, the most accurate Chinese text similarity calculation tool.(最准的中文文本相似度计算工具)
Install
- pip3 install text2vec
or
git clone https://github.com/shibing624/text2vec.git
cd text2vec
python3 setup.py install
Usage:
import text2vec
a = '如何更换花呗绑定银行卡'
b = '花呗更改绑定银行卡'
emb = text2vec.encode(a)
print(emb)
s = text2vec.score(a, b)
print(s)
output:
0.9569100456524151
Reference
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
text2vec-0.1.1-py3.6.egg
(129.2 kB
view hashes)