ontolearn.lp_generator.helper_classes
Classes
Learning problem generator. |
|
The knowledge graph/base is converted into triples of the form: individual_i ---role_j---> concept_k or |
|
This class takes an owl file, loads it into a knowledge base using ontolearn.knowledge_base.KnowledgeBase. |
Module Contents
- class ontolearn.lp_generator.helper_classes.ConceptDescriptionGenerator(knowledge_base, refinement_operator, depth=2, max_length=10, num_sub_roots=150)[source]
Learning problem generator.
- kb
- rho
- depth
- num_sub_roots
- max_length
- class ontolearn.lp_generator.helper_classes.RDFTriples(kb_path, storage_dir=None)[source]
The knowledge graph/base is converted into triples of the form: individual_i —role_j—> concept_k or individual_i —role_j—> individual_k and stored in a txt file for the computation of embeddings.
- Graph
- kb_path
- class ontolearn.lp_generator.helper_classes.KB2Data(path, storage_dir=None, max_num_lps=1000, depth=3, max_child_length=20, refinement_expressivity=0.2, downsample_refinements=True, sample_fillers_count=10, num_sub_roots=50, min_num_pos_examples=1)[source]
This class takes an owl file, loads it into a knowledge base using ontolearn.knowledge_base.KnowledgeBase. A refinement operator is used to generate a large number of concepts, from which we filter and retain the shortest non-redundant concepts. We export each concept and its instances (eventually positive and negative examples) into a json file.
- path
- max_num_lps
- dl_syntax_renderer
- kb
- num_examples
- min_num_pos_examples
- atomic_concept_names
- lp_gen