You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
'''
|
|
conda activate rag
|
|
pip install gensim[complete]
|
|
pip install jieba
|
|
'''
|
|
|
|
from Util.EmbeddingUtil import *
|
|
# 在加载模型后添加自定义词典
|
|
jieba.load_userdict("./Dict/custom_dict.txt") # 文件中包含: 花呗
|
|
|
|
sentences = ['如何更换花呗绑定银行卡', '花呗更改绑定银行卡']
|
|
|
|
for sentence in sentences:
|
|
x = text_to_embedding(sentence) |