:py:mod:`ontolearn.ea_utils` ============================ .. py:module:: ontolearn.ea_utils .. autoapi-nested-parse:: Utils for evolutionary algorithms. Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: ontolearn.ea_utils.PrimitiveFactory ontolearn.ea_utils.OperatorVocabulary ontolearn.ea_utils.ToolboxVocabulary Functions ~~~~~~~~~ .. autoapisummary:: ontolearn.ea_utils.escape ontolearn.ea_utils.ind_to_string ontolearn.ea_utils.owlliteral_to_primitive_string Attributes ~~~~~~~~~~ .. autoapisummary:: ontolearn.ea_utils.Tree .. py:data:: Tree .. py:class:: PrimitiveFactory .. py:attribute:: __slots__ :value: 'generator' .. py:method:: create_union() -> Callable[[owlapy.class_expression.OWLClassExpression, owlapy.class_expression.OWLClassExpression], owlapy.class_expression.OWLObjectUnionOf] .. py:method:: create_intersection() -> Callable[[owlapy.class_expression.OWLClassExpression, owlapy.class_expression.OWLClassExpression], owlapy.class_expression.OWLObjectIntersectionOf] .. py:method:: create_existential_universal(property_: owlapy.owl_property.OWLObjectPropertyExpression) -> Tuple[Callable[[owlapy.class_expression.OWLClassExpression], owlapy.class_expression.OWLObjectSomeValuesFrom], Callable[[owlapy.class_expression.OWLClassExpression], owlapy.class_expression.OWLObjectAllValuesFrom]] .. py:method:: create_card_restrictions(property_: owlapy.owl_property.OWLObjectPropertyExpression) -> Tuple[Callable[[int, owlapy.class_expression.OWLClassExpression], owlapy.class_expression.OWLObjectMinCardinality], Callable[[int, owlapy.class_expression.OWLClassExpression], owlapy.class_expression.OWLObjectMaxCardinality], Callable[[int, owlapy.class_expression.OWLClassExpression], owlapy.class_expression.OWLObjectExactCardinality]] .. py:method:: create_data_some_values(property_: owlapy.owl_property.OWLDataPropertyExpression) -> Tuple[Callable[[owlapy.owl_literal.OWLLiteral], owlapy.class_expression.OWLDataSomeValuesFrom], Callable[[owlapy.owl_literal.OWLLiteral], owlapy.class_expression.OWLDataSomeValuesFrom], Callable[[owlapy.owl_literal.OWLLiteral], owlapy.class_expression.OWLDataSomeValuesFrom], Callable[[owlapy.owl_literal.OWLLiteral], owlapy.class_expression.OWLDataSomeValuesFrom]] .. py:method:: create_data_has_value(property_: owlapy.owl_property.OWLDataPropertyExpression) -> Callable[[owlapy.owl_literal.OWLLiteral], owlapy.class_expression.OWLDataHasValue] .. py:class:: OperatorVocabulary Bases: :py:obj:`str`, :py:obj:`enum.Enum` str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'. .. py:attribute:: UNION :type: Final :value: 'union' .. py:attribute:: INTERSECTION :type: Final :value: 'intersection' .. py:attribute:: NEGATION :type: Final :value: 'negation' .. py:attribute:: EXISTENTIAL :type: Final :value: 'exists' .. py:attribute:: UNIVERSAL :type: Final :value: 'forall' .. py:attribute:: INVERSE :type: Final :value: 'inverse' .. py:attribute:: CARD_MIN :type: Final :value: 'cardMin' .. py:attribute:: CARD_MAX :type: Final :value: 'cardMax' .. py:attribute:: CARD_EXACT :type: Final :value: 'cardExact' .. py:attribute:: DATA_MIN_INCLUSIVE :type: Final :value: 'dataMinInc' .. py:attribute:: DATA_MAX_INCLUSIVE :type: Final :value: 'dataMaxInc' .. py:attribute:: DATA_MIN_EXCLUSIVE :type: Final :value: 'dataMinExc' .. py:attribute:: DATA_MAX_EXCLUSIVE :type: Final :value: 'dataMaxExc' .. py:attribute:: DATA_HAS_VALUE :type: Final :value: 'dataHasValue' .. py:class:: ToolboxVocabulary Bases: :py:obj:`str`, :py:obj:`enum.Enum` str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'. .. py:attribute:: MUTATION :type: Final :value: 'mutate' .. py:attribute:: CROSSOVER :type: Final :value: 'mate' .. py:attribute:: SELECTION :type: Final :value: 'select' .. py:attribute:: COMPILE :type: Final :value: 'compile' .. py:attribute:: INIT_POPULATION :type: Final :value: 'population' .. py:attribute:: FITNESS_FUNCTION :type: Final :value: 'apply_fitness' .. py:attribute:: HEIGHT_KEY :type: Final :value: 'height' .. py:function:: escape(name: str) -> str .. py:function:: ind_to_string(ind: List[Tree]) -> str .. py:function:: owlliteral_to_primitive_string(lit: owlapy.owl_literal.OWLLiteral, pe: Optional[Union[owlapy.owl_property.OWLDataProperty, owlapy.owl_property.OWLObjectProperty]] = None) -> str