(entity, relation, head=True)
| 150 | |
| 151 | |
| 152 | def entity_search(entity, relation, head=True): |
| 153 | if head: |
| 154 | tail_entities_extract = sparql_tail_entities_extract% (entity, relation) |
| 155 | entities = execurte_sparql(tail_entities_extract) |
| 156 | else: |
| 157 | head_entities_extract = sparql_head_entities_extract% (entity, relation) |
| 158 | entities = execurte_sparql(head_entities_extract) |
| 159 | |
| 160 | |
| 161 | entity_ids = replace_entities_prefix(entities) |
| 162 | new_entity = [entity for entity in entity_ids if entity.startswith("m.")] |
| 163 | return new_entity |
| 164 | |
| 165 | |
| 166 | def entity_score(question, entity_candidates_id, score, relation, args): |
nothing calls this directly
no test coverage detected