ontolearn.semantic_caching
python examples/retrieval_eval.py
Classes
Functions
|
|
|
Shuffle the generated concept and save it in a folder for reproducibility |
|
|
|
This function implements the semantic caching algorithm for ALC concepts as presented in the paper |
|
This function implements a caching algorithm for ALC concepts without semantics. |
|
Retrieve instances with neural reasoner |
|
Retrieve instances with symbolic reasoners |
|
Return cache performnace with semantics |
|
Return cache performnace without any semantics |
Module Contents
- ontolearn.semantic_caching.get_shuffled_concepts(path_kg, data_name)[source]
Shuffle the generated concept and save it in a folder for reproducibility
- class ontolearn.semantic_caching.CacheWithEviction(cache_size, strategy='LIFO', random_seed=10)[source]
- cache
- access_times
- cache_size
- strategy = 'LIFO'
- random_seed = 10
- initialized = False
- initialize_cache(func, path_onto, third, All_individuals, handle_restriction_func, concepts)[source]
Initialize the cache with precomputed results for OWLClass and Existential concepts. :param ontology: The loaded ontology. :param func: Function to retrieve individuals for a given expression. :param concepts: List of OWL concepts to precompute and store instances for.
- ontolearn.semantic_caching.semantic_caching_size(func, cache_size, eviction_strategy, random_seed, cache_type, concepts)[source]
This function implements the semantic caching algorithm for ALC concepts as presented in the paper
- ontolearn.semantic_caching.non_semantic_caching_size(func, cache_size)[source]
This function implements a caching algorithm for ALC concepts without semantics.
- ontolearn.semantic_caching.retrieve(expression: str, path_kg: str, path_kge_model: str) Tuple[Set[str], Set[str]] [source]
Retrieve instances with neural reasoner
- ontolearn.semantic_caching.retrieve_other_reasoner(expression, path_kg, name_reasoner='HermiT')[source]
Retrieve instances with symbolic reasoners