Browse Source

fixed some bugs regarding tag and ntag search algo, still only for rocket interface command

master
alpcentaur 10 months ago
parent
commit
f2a30fbe06
3 changed files with 47 additions and 30 deletions
  1. +46
    -27
      fdb_spider_interface.py
  2. +1
    -1
      new_message_file.txt
  3. +0
    -2
      roomhistories/657c97e5ebb39dd248d38d51.txt

+ 46
- 27
fdb_spider_interface.py View File

@ -548,31 +548,36 @@ if __name__ == '__main__':
if '_' in tag:
ntags = tag.split('_')
ntags_length = len(ntags)
print(ntags)
ntag_count = 0
for nword in name_data_lower:
for ntag in ntags:
if ntag.lower() in nword and nword != '':
ntag_count += 1
for ntag in ntags:
for nword in name_data_lower:
if ntag.lower() in nword:
if nword != '':
ntag_count += 1
break
if ntag_count == ntags_length:
contains_tag = True
tag_list.append(ntags.join('_') + ' in name')
ntag_count = 0
for iword in info_data_lower:
for ntag in ntags:
if ntag.lower() in iword and iword != '':
ntag_count += 1
for ntag in ntags:
for iword in info_data_lower:
if ntag.lower() in iword:
if iword != '':
ntag_count += 1
break
if ntag_count == ntags_length:
contains_tag = True
tag_list.append(ntags.join('_') + ' in info')
ntag_count = 0
for tword in text_data_lower:
ntag_count = 0
for ntag in ntags:
if ntag.lower() in tword and tword != '':
ntag_count += 1
for ntag in ntags:
for tword in text_data_lower:
if ntag.lower() in tword:
if tword != '':
ntag_count += 1
break
if ntag_count == ntags_length:
contains_tag = True
tag_list.append(ntags.join('_') + ' in text')
@ -580,26 +585,40 @@ if __name__ == '__main__':
else:
#print('------------------')
#print(name_data_lower, info_data_lower, text_data_lower, room[0], room_tags)
print(name_data_lower, info_data_lower, text_data_lower, room[0], room_tags)
nword_contains_tag = False
for nword in name_data_lower:
if tag.lower() in nword and nword != '':
contains_tag = True
if contains_tag == True:
print(tag.lower(), nword)
if tag.lower() in nword:
print('goooot heeeere')
print(nword)
if nword != '':
print('goot behind nword check')
nword_contains_tag = True
if nword_contains_tag == True:
contains_tag = True
tag_list.append(tag + ' in name')
iword_contains_tag = False
for iword in info_data_lower:
if tag.lower() in iword and iword != '':
contains_tag = True
if contains_tag == True:
if tag.lower() in iword:
if iword != '':
iword_contains_tag = True
print('oioiOIOIOIoioioiOIOIword', iword)
if iword_contains_tag == True:
contains_tag = True
tag_list.append(tag + ' in info')
for tword in text_data_lower::
if tag.lower() in tword and tword != '':
contains_tag = True
if contains_tag == True:
tword_contains_tag = False
for tword in text_data_lower:
if tag.lower() in tword:
if tword != '':
tword_contains_tag = True
if tword_contains_tag == True:
contains_tag = True
tag_list.append(tag + ' in text')
if contains_tag == True:
print('------------------')
print(name_data_lower, info_data_lower, text_data_lower)
#print('------------------')
#print(name_data_lower, info_data_lower, text_data_lower)
try:
url = data[room_fdb][i][key]["domain"]
except:

+ 1
- 1
new_message_file.txt View File

@ -1 +1 @@
updaterooms 657c97e5ebb39dd248d38d51§%§%awNMcpqH8ZhCc3Cx6
updaterooms 657c97e5ebb39dd248d38d51§%§%kJRnyNTcJSHa8sAew

+ 0
- 2
roomhistories/657c97e5ebb39dd248d38d51.txt View File

@ -1,8 +1,6 @@
<https://ausschreibungen.giz.de/Satellite/public/company/project/CXTRYY6Y1AXZRLFW/de/overview?19|81304134-Mission de coaching pour l'accompagnement de 15 entreprises industrielles pour le calcul de l"empreinte carbone selon la norme ISO 14067:2018>
<https://ausschreibungen.giz.de/Satellite/public/company/project/CXTRYY6Y1AZS8RDL/de/overview?28|81303963 - Entwicklung eines webbasierten Trainings für Fachthemen im Bereich des nachhaltigem Entrepreneurships>
<https://ausschreibungen.giz.de/Satellite/public/company/project/CXR2YYRYYDA/de/overview?38|81298137-Development of tools, instruments and project concepts to leverage climate finance to scale up renewables and energy efficiency in Côte d'Ivoire>
<https://ausschreibungen.giz.de/Satellite/public/company/project/CXTRYY6Y1L7LSVE5/de/overview?53|Pool of energy efficiency experts>
<https://ausschreibungen.giz.de/Satellite/public/company/project/CXTRYY6Y1L1QRSZU/de/overview?85|81303447-Implementing Energy Efficiency during refurbishment of non-residential buildings in Morocco>
<https://ausschreibungen.giz.de/Satellite/public/company/project/CXTRYY6Y1EQWGUKJ/de/overview?90|81301134 - Provide recommendations for Donor Interventions to support Green Industrial Policies and Just Transition Implications>
<https://ausschreibungen.giz.de/Satellite/public/company/project/CXTRYY6Y1CV0XTS6/de/overview?97|81296882-Unterstützungsleistungen für das SV Klima>
<https://ausschreibungen.giz.de/Satellite/public/company/project/CXTRYY6Y1C82BB4U/de/overview?99|81294786-Development of Sustainable Energy and Climate Action Plans for selected Local Self-Government Units in Western Balkans>

Loading…
Cancel
Save