ontolearn.learners.spell_kit.o2p_ontology

Attributes

SPECIAL_CHARS

Exceptions

FeatureNotSupported

Common base class for all non-exit exceptions.

Classes

Ontology

NameFactory

OntologyObject

The base class for all entities in the ontology.

SubProperty

Property

PropertyReference

ObjectProperty

Expression

The base class for all entities in the ontology.

Rule

A ontology expression of the form A sqsubseteq B.

SubClassOf

A ontology expression of the form A sqsubseteq B.

EquivalentClass

A ontology expression of the form A sqsubseteq B.

DisjointWith

A ontology expression of the form A sqsubseteq B.

Thing

The base class for all entities in the ontology.

ClassIdentifier

A class in the ontology.

TopClass

A class in the ontology.

Restriction

The base class for all entities in the ontology.

Intersection

The base class for all entities in the ontology.

Union

The base class for all entities in the ontology.

Complement

The base class for all entities in the ontology.

OneOf

The base class for all entities in the ontology.

Quantifier

HasSelf

SomeValues

AllValues

Cardinality

MinCardinality

MaxCardinality

HasValue

Functions

issimple(expr)

Module Contents

ontolearn.learners.spell_kit.o2p_ontology.SPECIAL_CHARS
exception ontolearn.learners.spell_kit.o2p_ontology.FeatureNotSupported(*args)[source]

Bases: Exception

Common base class for all non-exit exceptions.

class ontolearn.learners.spell_kit.o2p_ontology.Ontology[source]

Bases: object

add_rule(rule)[source]
normalize()[source]
add_property(prop)[source]
check_implicit_cycle()[source]
property properties
property rules
property subproperties
property property_ranges
property property_domains
__iter__()[source]
__len__()[source]
class ontolearn.learners.spell_kit.o2p_ontology.NameFactory[source]

Bases: object

created_names
classmethod next_name()[source]
class ontolearn.learners.spell_kit.o2p_ontology.OntologyObject[source]

Bases: object

The base class for all entities in the ontology.

abstractmethod to_latex()[source]
__repr__()[source]
property is_rule
class ontolearn.learners.spell_kit.o2p_ontology.SubProperty(subject, object_)[source]

Bases: object

subject
object
__str__()[source]
class ontolearn.learners.spell_kit.o2p_ontology.Property[source]

Bases: object

class ontolearn.learners.spell_kit.o2p_ontology.PropertyReference(identifier)[source]

Bases: Property

identifier
__str__()[source]
class ontolearn.learners.spell_kit.o2p_ontology.ObjectProperty(identifier, parent=None, is_functional=False, is_reflexive=False, is_inverse_functional=False, is_transitive=False, is_symmetric=False, domain=None, range=None, inverse_of=None)[source]

Bases: Property

identifier
parent = None
is_functional = False
is_inverse_functional = False
is_transitive = False
is_symmetric = False
is_reflexive = False
domain = None
range = None
inverse_of = None
__str__()[source]
class ontolearn.learners.spell_kit.o2p_ontology.Expression(identifier=None)[source]

Bases: OntologyObject

The base class for all entities in the ontology.

varcount = 0
classmethod get_safe_varname()[source]
expression_types
classmethod register_type(tagname, factory)[source]
classmethod get_factory(tagname)[source]
identifier = None
abstractmethod normalize_rhs()[source]
normalize_lhs()[source]
__and__(other)[source]
__lshift__(other)[source]
class ontolearn.learners.spell_kit.o2p_ontology.Rule(subject, object_)[source]

Bases: OntologyObject

A ontology expression of the form A sqsubseteq B.

property subject
property object
property is_rule
normalize()[source]

Return a normalization of this rule.

Returns:

list of new rules

ontolearn.learners.spell_kit.o2p_ontology.issimple(expr)[source]
class ontolearn.learners.spell_kit.o2p_ontology.SubClassOf(subject, object_)[source]

Bases: Rule

A ontology expression of the form A sqsubseteq B.

normalize()[source]

Return a normalization of this rule.

Returns:

list of new rules

__str__()[source]
to_latex()[source]
class ontolearn.learners.spell_kit.o2p_ontology.EquivalentClass(subject, object_)[source]

Bases: Rule

A ontology expression of the form A sqsubseteq B.

normalize()[source]

Return a normalization of this rule.

Returns:

list of new rules

__str__()[source]
class ontolearn.learners.spell_kit.o2p_ontology.DisjointWith(subject, object_)[source]

Bases: Rule

A ontology expression of the form A sqsubseteq B.

normalize()[source]

Return a normalization of this rule.

Returns:

list of new rules

__str__()[source]
class ontolearn.learners.spell_kit.o2p_ontology.Thing(identifier)[source]

Bases: Expression

The base class for all entities in the ontology.

normalize_rhs()[source]
__str__()[source]
class ontolearn.learners.spell_kit.o2p_ontology.ClassIdentifier(identifier)[source]

Bases: Expression

A class in the ontology.

normalize_rhs()[source]
__str__()[source]
to_latex()[source]
class ontolearn.learners.spell_kit.o2p_ontology.TopClass[source]

Bases: Expression

A class in the ontology.

normalize_rhs()[source]
__str__()[source]
to_latex()[source]
class ontolearn.learners.spell_kit.o2p_ontology.Restriction(quantifier, prop)[source]

Bases: Expression

The base class for all entities in the ontology.

quantifier
prop
normalize_lhs()[source]
normalize_rhs()[source]
to_latex()[source]
__str__()[source]
class ontolearn.learners.spell_kit.o2p_ontology.Intersection(children)[source]

Bases: Expression

The base class for all entities in the ontology.

children
normalize_lhs()[source]
normalize_rhs()[source]
__str__()[source]
to_latex()[source]
__and__(other)[source]
class ontolearn.learners.spell_kit.o2p_ontology.Union(children)[source]

Bases: Expression

The base class for all entities in the ontology.

children
normalize_rhs()[source]
__str__()[source]
class ontolearn.learners.spell_kit.o2p_ontology.Complement(child)[source]

Bases: Expression

The base class for all entities in the ontology.

child
normalize_rhs()[source]
__str__()[source]
class ontolearn.learners.spell_kit.o2p_ontology.OneOf(children)[source]

Bases: Expression

The base class for all entities in the ontology.

children
normalize_rhs()[source]
__str__()[source]
class ontolearn.learners.spell_kit.o2p_ontology.Quantifier[source]

Bases: object

abstractmethod to_string(prop)[source]
abstractmethod normalize_rhs()[source]
class ontolearn.learners.spell_kit.o2p_ontology.HasSelf[source]

Bases: Quantifier

to_string(prop)[source]
normalize_rhs()[source]
normalize_lhs()[source]
class ontolearn.learners.spell_kit.o2p_ontology.SomeValues(from_class)[source]

Bases: Quantifier

from_class
to_string(prop)[source]
to_latex(prop)[source]
normalize_lhs()[source]
normalize_rhs()[source]
class ontolearn.learners.spell_kit.o2p_ontology.AllValues(from_class)[source]

Bases: Quantifier

from_class
to_string(prop)[source]
normalize_rhs()[source]
class ontolearn.learners.spell_kit.o2p_ontology.Cardinality(count)[source]

Bases: Quantifier

count
to_string(prop)[source]
normalize_rhs()[source]
class ontolearn.learners.spell_kit.o2p_ontology.MinCardinality(count)[source]

Bases: Quantifier

count
to_string(prop)[source]
normalize_rhs()[source]
class ontolearn.learners.spell_kit.o2p_ontology.MaxCardinality(count)[source]

Bases: Quantifier

count
to_string(prop)[source]
normalize_rhs()[source]
class ontolearn.learners.spell_kit.o2p_ontology.HasValue(value)[source]

Bases: Quantifier

value
to_string(prop)[source]
normalize_rhs()[source]
normalize_lhs()[source]