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

Function replace_relation_prefix

ToG/freebase_func.py:30–31  ·  view source on GitHub ↗
(relations)

Source from the content-addressed store, hash-verified

28
29
30def replace_relation_prefix(relations):
31 return [relation['relation']['value'].replace("http://rdf.freebase.com/ns/","") for relation in relations]
32
33def replace_entities_prefix(entities):
34 return [entity['tailEntity']['value'].replace("http://rdf.freebase.com/ns/","") for entity in entities]

Callers 1

relation_search_pruneFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected