ner tagging

This commit is contained in:
hsafaei
2025-02-15 13:19:35 +03:30
parent b54683638a
commit dabf86ba7d
5 changed files with 118 additions and 1378 deletions
+8 -2
View File
@@ -118,7 +118,7 @@ class ElasticHelper():
##############################
def backupIndexToZipfile(self, path_back, index_name, out_name= '', body={}, byzip = True, fields=[]) :
def backupIndexToZipfile(self, path_back, index_name, out_name= '', body={}, byzip = True, fields=[], noFields=[]) :
print('*' * 50, ' start backup -->', index_name)
self.counter = 0
@@ -160,7 +160,13 @@ class ElasticHelper():
if kf in item['_source'] :
item2['_source'][kf] = item['_source'][kf]
else :
item2=item
item2=item
if noFields :
for kf in noFields :
if kf in item2['_source']:
del item2['_source'][kf]
out_json.append(item2)