You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Look at this code
`
elif startEntity_in_input_entities is None and endEntity_in_input_entities is None:
print(f"[INFO][INVENTED ENTITIES] Aie; the entities {startEntity} and {endEntity} are invented. Solving them ...")
startEntity.embed_Entity(embeddings_function=self.langchain_output_parser.calculate_embeddings,
entity_label_weight=entity_label_weight,
entity_name_weight=entity_name_weight)
endEntity.embed_Entity(embeddings_function=self.langchain_output_parser.calculate_embeddings,
entity_label_weight=entity_label_weight,
entity_name_weight=entity_name_weight)
`
According to the ”find_match“, startEntity is returned if it does not find a similar entity among entities
At this point, startEntity is not in the entities list, but in the curated_relationships list. Is this correct?
The text was updated successfully, but these errors were encountered:
Yes, your understanding is correct. Based on the behavior of find_match, if it does not find a similar entity among the entities list, it simply returns the startEntity as-is.
I have lowered the value of threshold to 0.5 to maximise the chances to have a match because we assume that the extracted entities are exhaustive, so any invented entity might be just a rewriting of an original entity from the entities list.
However, to keep the code clean and handle all the possible cases, I will add a feature which consists of adding the invented entity (in case no match found under 0.5 threshold) to the input entities list.
Look at this code
`
elif startEntity_in_input_entities is None and endEntity_in_input_entities is None:
print(f"[INFO][INVENTED ENTITIES] Aie; the entities {startEntity} and {endEntity} are invented. Solving them ...")
startEntity.embed_Entity(embeddings_function=self.langchain_output_parser.calculate_embeddings,
entity_label_weight=entity_label_weight,
entity_name_weight=entity_name_weight)
endEntity.embed_Entity(embeddings_function=self.langchain_output_parser.calculate_embeddings,
entity_label_weight=entity_label_weight,
entity_name_weight=entity_name_weight)
`
According to the ”find_match“, startEntity is returned if it does not find a similar entity among entities
At this point, startEntity is not in the entities list, but in the curated_relationships list. Is this correct?
The text was updated successfully, but these errors were encountered: