kroma.tasks.query_engine
Query
query asks each named strategy for local context and concatenates the results.
Call
query(concept_code, pcmap, dictionary, options)
-> parents, children, synonyms, labels
register_query_strategy(name, strategy) -> None
Unknown option names are skipped. A strategy that raises is skipped, and the other options still return.
Source: query_engine.py.
Strategies
| Strategy | Option names |
|---|---|
DictionaryStrategy | envo, sweet, mouse, human, yago, wikidata, mi, mi2, matonto, emmo, omim, ordo |
SparqlStrategy | ncit, doid, dbpedia |
OntologyStrategy | ontology |
ConceptNetStrategy | conceptnet |
A custom source is any object with fetch(code, pcmap, dictionary, topk) registered under a name.