Skip to main content

My short description for my project.

Project description



tfidf 余弦短文本求相似度


gensim jieba pandas

Tfidf = Tfidf(stopwords_file="", work_dir="", work_file_prefix="")
#stopwords_file 停用词文件 可不填 包里自带有
#work_dir 工作目录 模型存储的路径,不填则在当前项目根目录下 建议填
#work_file_prefix 文件名字前缀, 不填则训练的模型名字为 _.model 可以填时间戳,或者用户id,建议填写 不然模型会相互覆盖
# QA 场景
# 问题列表
question_list = [

# 答案列表
answer_list = [

Tfidf = Tfidf(stopwords_file="", work_dir="", work_file_prefix="")
# 训练模型并保存

# 输入问题,并去计算相似度"test question")

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nlp-tfidf-1.5.7.tar.gz (18.9 kB view hashes)

Uploaded source

Built Distribution

nlp_tfidf-1.5.7-py2.py3-none-any.whl (17.2 kB view hashes)

Uploaded py2 py3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page