fix bug tokens

This commit is contained in:
hsafaei
2025-04-15 15:17:00 +03:30
parent c84c635055
commit 302f6b5cd8
4 changed files with 70 additions and 75 deletions
+3 -3
View File
@@ -128,8 +128,8 @@ def exportTokensToFile(elastic, index_name_i, filename, fields=['content'], body
def diff_files_to_file(file_dict1, file_dict2, filename, path_out="./data/"):
dict1 = json.loads(open(file_dict1, "r", encoding="utf-8").read())
dict2 = json.loads(open(file_dict2, "r", encoding="utf-8").read())
dict1 = json.loads(open(path_out+file_dict1, "r", encoding="utf-8").read())
dict2 = json.loads(open(path_out+file_dict2, "r", encoding="utf-8").read())
return diff_to_file(dict1, dict2, filename, False, path_out)
def diff_to_file(dict1, dict2, filename, by_diff_count=False, path_out="./data/"):
@@ -184,7 +184,7 @@ elastic = ElasticHelper(host, password, "elastic", path_base_map)
# exportTokensToFile(elastic,"mj_qa_section", "content_mj_qa_section_1.txt")
exportTokensMulti(elastic,"mj_qa_section", "mj_qa_section")
#exportTokensMulti(elastic,"mj_qa_section", "mj_qa_section")
diff_files_to_file("mj_qa_section1.txt", "mj_qa_section2.txt", "diff_1_2.txt")
diff_files_to_file("mj_qa_section2.txt", "mj_qa_section1.txt", "diff_2_1.txt")