MCPcopy Create free account
hub / github.com/DataArcTech/ToG / abandon_rels

Function abandon_rels

ToG/wiki_func.py:46–50  ·  view source on GitHub ↗
(relation)

Source from the content-addressed store, hash-verified

44
45
46def abandon_rels(relation):
47 useless_relation_list = ["category's main topic", "topic\'s main category", "stack exchange site", 'main subject', 'country of citizenship', "commons category", "commons gallery", "country of origin", "country", "nationality"]
48 if check_end_word(relation) or 'wikidata' in relation.lower() or 'wikimedia' in relation.lower() or relation.lower() in useless_relation_list:
49 return True
50 return False
51
52
53def construct_entity_score_prompt(question, relation, entity_candidates):

Callers 1

relation_search_pruneFunction · 0.70

Calls 1

check_end_wordFunction · 0.70

Tested by

no test coverage detected