ontolearn.learners.spell_kit.structures

Attributes

namespaces

Signature

tag_onto

tag_ni

tag_type

tag_class

tag_thing

tag_object_prop

tag_data_prop

tag_annotation_prop

attr_resource

attr_about

attr_datatype

Classes

Structure

ABoxBuilder

TBox

Functions

ind(→ range)

conceptnames(→ list[str])

rolenames(→ list[str])

conceptname_ext(→ set[int])

expand_namespace(namespace, item)

tag2name(tag)

name2sparql(name)

expand_curie(curie, nsmap)

map_ind_name(→ int)

add_ns(n)

make_res_absolute(→ str)

load_owl(file)

structure_from_owl(→ Structure)

construct_normalized_tbox(onto)

compact_canonical_model(abox, tbox)

structure_to_dot(A, indmap)

not_owl_thing(cn)

solution2sparql(q)

restrict_to_neighborhood(k, A, starts)

generate_all_trees(order)

next_rooted_tree(predecessor)

levels_to_preds(→ list[int])

copy_structure(→ Structure)

Module Contents

ontolearn.learners.spell_kit.structures.namespaces
ontolearn.learners.spell_kit.structures.Signature
class ontolearn.learners.spell_kit.structures.Structure[source]
max_ind: int
cn_ext: dict[str, set[int]]
rn_ext: dict[int, set[tuple[int, str]]]
indmap: dict[str, int]
nsmap: dict[str | None, str]
ontolearn.learners.spell_kit.structures.ind(A: Structure) range[source]
ontolearn.learners.spell_kit.structures.conceptnames(sigma: Signature) list[str][source]
ontolearn.learners.spell_kit.structures.rolenames(sigma: Signature) list[str][source]
ontolearn.learners.spell_kit.structures.conceptname_ext(A: Structure, cn: str) set[int][source]
ontolearn.learners.spell_kit.structures.expand_namespace(namespace: str, item: str)[source]
ontolearn.learners.spell_kit.structures.tag2name(tag: str)[source]
ontolearn.learners.spell_kit.structures.name2sparql(name: str)[source]
ontolearn.learners.spell_kit.structures.expand_curie(curie, nsmap)[source]
ontolearn.learners.spell_kit.structures.map_ind_name(A: Structure, name: str) int[source]
ontolearn.learners.spell_kit.structures.add_ns(n: str)[source]
class ontolearn.learners.spell_kit.structures.ABoxBuilder[source]
A: Structure
indmap: dict[str, int]
role_names
map_ind(a: str)[source]
declare_cn(cn)[source]
declare_rn(rn)[source]
concept_assertion(a: int, concept: str)[source]
role_assertion(idx1: int, ind2: str, role: str)[source]
ontolearn.learners.spell_kit.structures.tag_onto
ontolearn.learners.spell_kit.structures.tag_ni
ontolearn.learners.spell_kit.structures.tag_type
ontolearn.learners.spell_kit.structures.tag_class
ontolearn.learners.spell_kit.structures.tag_thing
ontolearn.learners.spell_kit.structures.tag_object_prop
ontolearn.learners.spell_kit.structures.tag_data_prop
ontolearn.learners.spell_kit.structures.tag_annotation_prop
ontolearn.learners.spell_kit.structures.attr_resource
ontolearn.learners.spell_kit.structures.attr_about
ontolearn.learners.spell_kit.structures.attr_datatype
ontolearn.learners.spell_kit.structures.make_res_absolute(nsmap: dict[Any, str], res: str) str[source]
ontolearn.learners.spell_kit.structures.load_owl(file: str)[source]
ontolearn.learners.spell_kit.structures.structure_from_owl(file) Structure[source]
class ontolearn.learners.spell_kit.structures.TBox(top: str)[source]
fresh_names: set[str]
implic: dict[str, set[str]]
conjs: dict[str, set[frozenset[str]]]
top: str
cns: set[str]
rns: set[str]
rBrhs: dict[str, set[tuple[str, str]]]
rBlhs: dict[str, set[tuple[str, str]]]
range_cn_ctr: int
ranges: dict[str, set[str]]
role_incs: dict[str, set[str]]
non_empty_conjs()[source]
non_empty_lhs()[source]
non_empty_rhs()[source]
register_cn(A: str)[source]
register_rn(r: str)[source]
add_axiom1(A: str, B: str)[source]
add_axiom2(A1: str, A2: str, B: str)[source]
add_axiom3(A: str, r: str, B: str)[source]
add_axiom4(r: str, A: str, B: str)[source]
add_range_restriction(r: str, A: str)[source]
add_role_inc(r: str, s: str)[source]
fresh_cn() str[source]
saturate_role_incs()[source]
saturate()[source]
ontolearn.learners.spell_kit.structures.construct_normalized_tbox(onto: Ontology)[source]
ontolearn.learners.spell_kit.structures.compact_canonical_model(abox: ABoxBuilder, tbox: TBox)[source]
ontolearn.learners.spell_kit.structures.structure_to_dot(A: Structure, indmap: dict[str, int])[source]
ontolearn.learners.spell_kit.structures.not_owl_thing(cn)[source]
ontolearn.learners.spell_kit.structures.solution2sparql(q: Structure)[source]
ontolearn.learners.spell_kit.structures.restrict_to_neighborhood(k: int, A: Structure, starts: list[int])[source]
ontolearn.learners.spell_kit.structures.generate_all_trees(order: int)[source]
ontolearn.learners.spell_kit.structures.next_rooted_tree(predecessor: list[int])[source]
ontolearn.learners.spell_kit.structures.levels_to_preds(layout: list[int]) list[int][source]
ontolearn.learners.spell_kit.structures.copy_structure(A: Structure) Structure[source]