ontolearn.concept_abstract_syntax_tree

Classes

Expr

Helper class that provides a standard way to create an ABC using

Atoms

Helper class that provides a standard way to create an ABC using

Not

Helper class that provides a standard way to create an ABC using

And

Helper class that provides a standard way to create an ABC using

Or

Helper class that provides a standard way to create an ABC using

Exists

Helper class that provides a standard way to create an ABC using

Forall

Helper class that provides a standard way to create an ABC using

Cardinality

Helper class that provides a standard way to create an ABC using

ConceptAbstractSyntaxTreeBuilder

Module Contents

class ontolearn.concept_abstract_syntax_tree.Expr[source]

Bases: abc.ABC

Helper class that provides a standard way to create an ABC using inheritance.

abstractmethod to_string()[source]
abstractmethod to_dict()[source]
class ontolearn.concept_abstract_syntax_tree.Atoms(name)[source]

Bases: Expr

Helper class that provides a standard way to create an ABC using inheritance.

name
to_string()[source]
__repr__()[source]
to_dict()[source]
class ontolearn.concept_abstract_syntax_tree.Not(expr: Expr)[source]

Bases: Expr

Helper class that provides a standard way to create an ABC using inheritance.

expr
to_string()[source]
__repr__()[source]
to_dict()[source]
class ontolearn.concept_abstract_syntax_tree.And(left: Expr, right: Expr)[source]

Bases: Expr

Helper class that provides a standard way to create an ABC using inheritance.

left
right
to_string()[source]
__repr__()[source]
to_dict()[source]
class ontolearn.concept_abstract_syntax_tree.Or(left: Expr, right: Expr)[source]

Bases: Expr

Helper class that provides a standard way to create an ABC using inheritance.

left
right
to_string()[source]
__repr__()[source]
to_dict()[source]
class ontolearn.concept_abstract_syntax_tree.Exists(role: str, filler: Expr)[source]

Bases: Expr

Helper class that provides a standard way to create an ABC using inheritance.

role
filler
to_string()[source]
__repr__()[source]
to_dict()[source]
class ontolearn.concept_abstract_syntax_tree.Forall(role: str, filler: Expr)[source]

Bases: Expr

Helper class that provides a standard way to create an ABC using inheritance.

role
filler
to_string()[source]
__repr__()[source]
to_dict()[source]
class ontolearn.concept_abstract_syntax_tree.Cardinality(kind: str, n: int, role: str, filler: Expr)[source]

Bases: Expr

Helper class that provides a standard way to create an ABC using inheritance.

kind
n
role
filler
to_string()[source]
__repr__()[source]
to_dict()[source]
class ontolearn.concept_abstract_syntax_tree.ConceptAbstractSyntaxTreeBuilder(knowledge_base: KnowledgeBase, max_length: int | None = None)[source]
knowledge_base
max_length = None
unique_atom_concept_names
unique_roles
negation
binary_ops
quantifiers
cardinals
parenthesis
dot
digits
vocabs
atom_concepts_with_negation = None
balance_flatten_parentheses(sequences: list[str], max_length: int = None) list[str][source]
parse(token_sequence: List[str], relax_parentheses: bool = False, enforce_validity: bool | None = False, replace_with_negation: bool = False)[source]
render_tokens_as_class_expr(_tokens)[source]