ner tagging
This commit is contained in:
+13
-8
@@ -60,10 +60,10 @@ elastic = ElasticHelper(host, password, "elastic", path_base_map)
|
||||
# تولید بردار برای اجزائی که لازم هست
|
||||
|
||||
|
||||
#elastic.createIndex("mj_qa_section_ai", 'majles/', "mj_qa_section" )
|
||||
# elastic.createIndex("mj_qa_section_ai", 'majles/', "mj_qa_section" )
|
||||
|
||||
ai_url_vec=os.getenv("ai_url_vec")
|
||||
import_data_embeding(elastic, ai_url_vec ,"mj_qa_section", "mj_qa_section_ai", "content" )
|
||||
# ai_url_vec=os.getenv("ai_url_vec")
|
||||
# import_data_embeding(elastic, ai_url_vec ,"mj_qa_section", "mj_qa_section_ai", "content" )
|
||||
|
||||
|
||||
## 4.2 ## -----------------------------------------------------------------
|
||||
@@ -76,17 +76,22 @@ import_data_embeding(elastic, ai_url_vec ,"mj_qa_section", "mj_qa_section_ai", "
|
||||
|
||||
##///////////////////////////////////////////////////////////
|
||||
## پشتیبان گیری
|
||||
|
||||
# path_back = os.getcwd() + '/data_back'
|
||||
path_back = 'G:/Project2/111'
|
||||
# if not os.path.exists(path_back) :
|
||||
# os.makedirs(path_back)
|
||||
# print('---> path_back = ' + path_back)
|
||||
|
||||
# elastic.backupIndexToZipfile(path_back, "mj_qa_qanon")
|
||||
#elastic.backupIndexToZipfile(path_back, "mj_qa_qanon")
|
||||
# elastic.backupIndexToZipfile(path_back, "mj_qa_section")
|
||||
# elastic.backupIndexToZipfile(path_back, "mj_rg_section")
|
||||
# elastic.backupIndexToZipfile(path_back, "mj_qa_opinion")
|
||||
elastic.backupIndexToZipfile(path_back, "mj_qa_section", '', {}, True, [], ["pos_tags", "chunk_tags", "version_info"])
|
||||
#elastic.backupIndexToZipfile(path_back, "mj_qa_section_ai")
|
||||
#elastic.backupIndexToZipfile(path_back, "mj_rg_section")
|
||||
#elastic.backupIndexToZipfile(path_back, "mj_qa_opinion")
|
||||
|
||||
## کد نمونه بازیابی از فایل
|
||||
# path_back = 'G:/Project2/_back/back_data/data_majles/elastic/v1.0/full'
|
||||
# elastic.restorFileToElastic(path_back, 'mj_qa_section', 'majles')
|
||||
#path_back = 'G:/Project2/_back/back_data/data_majles/elastic/v1.0/full'
|
||||
# path_back = 'G:/Project2/111'
|
||||
# elastic.restorFileToElastic(path_back, 'mj_qa_section_ai', 'majles', True, 'mj_qa_section')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user