pepper.brain.utils.though_generator module¶
-
class
pepper.brain.utils.though_generator.
ThoughtGenerator
(address='http://localhost:7200/repositories/leolani', clear_all=False)[source]¶ Bases:
pepper.brain.basic_brain.BasicBrain
-
check_instance_novelty
(instance_url)[source]¶ Query if an instance (entity) has been heard about before :param instance_url: URI of instance :type instance_url: str
Returns: conflicts – List of provenance for the instance Return type: List[StatementNovelty]
-
get_entity_gaps
(entity, exclude=None)[source]¶ Query and build gaps with regards to the range and domain of the given entity and its predicates :param entity: Information regarding the entity :type entity: dict
Returns: Return type: Gaps object containing gaps related to range and domain information that could be learned
-
get_negation_conflicts
(utterance)[source]¶ Query and build negation conflicts, meaning conflicts because predicates are directly negated :param utterance:
Returns: conflicts – List of Conflicts containing the predicate which creates the conflict, and their provenance Return type: List[NegationConflict]
-
get_object_cardinality_conflicts
(utterance)[source]¶ Query and build cardinality conflicts, meaning conflicts because predicates should be one to one but have multiple object values :param utterance:
Returns: conflicts – List of Conflicts containing the object which creates the conflict, and their provenance Return type: List[CardinalityConflicts]
-
get_overlaps
(utterance)[source]¶ Query and build overlaps with regards to the subject and object of the heard statement :param utterance:
Returns: Return type: Overlaps containing shared information with the heard statement
-
get_statement_novelty
(statement_uri)[source]¶ Query and build provenance if an instance (statement) has been learned before :param statement_uri: URI of instance :type statement_uri: str
Returns: response – List of provenance for the instance Return type: List[StatementNovelty]
-