Update distance_text_or_vec.py

This commit is contained in:
yongzhuo 2019-04-13 00:32:41 +08:00 committed by GitHub
parent 9f1b9225c8
commit 196e0770f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,7 +2,7 @@
# !/usr/bin/python
# @time :2019/4/4 10:00
# @author :Mo
# @function :
# @function :calculate distances of Varity
from sklearn.feature_extraction.text import TfidfVectorizer
from utils.text_tools import txtRead, get_syboml, strQ2B
@ -324,7 +324,3 @@ if __name__ == '__main__':
print(num_of_common_sub_str(str1_test, str2_test))
print(normalization(vec1_test)) # 归一化0-1
print(z_score(vec1_test)) # 标准化0附近正负
# data_path = 'D:/workspace/python/bitbucket/nlp_model_v1.0/nlp_model/models/word_feature/sim_data/'
# tok_TD_IDF(data_path)
# tok_TD_IDF_pinyin(data_path)