diff --git a/dsRag/Conda维护.txt b/dsRag/Doc/Conda维护.txt similarity index 100% rename from dsRag/Conda维护.txt rename to dsRag/Doc/Conda维护.txt diff --git a/dsRag/Pip维护.txt b/dsRag/Doc/Pip维护.txt similarity index 100% rename from dsRag/Pip维护.txt rename to dsRag/Doc/Pip维护.txt diff --git a/dsRag/python环境配置.png b/dsRag/Doc/python环境配置.png similarity index 100% rename from dsRag/python环境配置.png rename to dsRag/Doc/python环境配置.png diff --git a/dsRag/T2_Txt2Vec.py b/dsRag/T2_Txt2Vec.py index 77e28f7c..d6c9fb32 100644 --- a/dsRag/T2_Txt2Vec.py +++ b/dsRag/T2_Txt2Vec.py @@ -8,6 +8,8 @@ pip install gensim[complete] ''' from Util.EmbeddingUtil import * +# 在加载模型后添加自定义词典 +jieba.load_userdict("custom_dict.txt") # 文件中包含: 花呗 sentences = ['如何更换花呗绑定银行卡', '花呗更改绑定银行卡'] diff --git a/dsRag/absolute/path/to/file b/dsRag/absolute/path/to/file new file mode 100644 index 00000000..68419498 --- /dev/null +++ b/dsRag/absolute/path/to/file @@ -0,0 +1,4 @@ +// ... existing code ... +# 在加载模型后添加自定义词典 +jieba.load_userdict("custom_dict.txt") # 文件中包含: 花呗 n +// ... existing code ... \ No newline at end of file diff --git a/dsRag/custom_dict.txt b/dsRag/custom_dict.txt new file mode 100644 index 00000000..0653b557 --- /dev/null +++ b/dsRag/custom_dict.txt @@ -0,0 +1 @@ +花呗 \ No newline at end of file