znj 1 жил өмнө
parent
commit
9b3d57c3fc

+ 4 - 1
BiddingKG/dl/interface/getAttributes.py

@@ -1668,6 +1668,8 @@ def findAttributeAfterEntity(PackDict,roleSet,PackageList,PackageSet,list_senten
                         break
                     if entity.label in [0, 1] and after_entity.label in [2, 3, 4]:
                         break
+                    if entity.label in [0, 1] and after_entity.label not in [0, 1]:
+                        break
 
     # km算法分配求解
     # for item in t_match_list:
@@ -1677,8 +1679,9 @@ def findAttributeAfterEntity(PackDict,roleSet,PackageList,PackageSet,list_senten
     for match in relate_location_result:
         _company = match[0]
         _relation = match[1]
-        # print("loc_rela2", _company.entity_text, _relation.entity_text, )
+        # print("loc_relation1", _company.entity_text, _relation.entity_text, )
         if not _company.pointer_address:
+            # print('loc_relation2',_company.entity_text,_relation.entity_text)
             _company.pointer_address = _relation
     # "联系人——联系电话" 链接规则补充
     person_phone_EntityList = [ent for ent in pre_entity+ phone_entitys if ent.entity_type not in ['company','org','location']]