def get_hypernymy_relation_source(self):
     relation = []
     for l, s in _icubworld28_labels_to_wordnet:
         for individual in range(1, 4 + 1):
             relation += [(f"{_namespace_uid}::{l}{individual}",
                           f"WordNet3.0::{s}")]
     return knowledge.StaticRelationSource(relation)
    def setUp(self):
        self.kb = knowledge.KnowledgeBase()
        self.kb.observe_concepts(["A", "B", "C"])

        srs = knowledge.StaticRelationSource([("B", "A"), ("C", "A")])
        self.kb.add_relation(
            "hypernymy",
            is_reflexive=False,
            is_symmetric=False,
            is_transitive=True,
            sources=[srs],
        )
Exemple #3
0
 def get_hypernymy_relation_source(self):
     return knowledge.StaticRelationSource([(f"{_namespace_uid}::{l}",
                                             f"WordNet3.0::{s}")
                                            for l, s in _labels_to_wordnet])
Exemple #4
0
 def get_hypernymy_relation_source(self):
     return knowledge.StaticRelationSource(self.tuples)
Exemple #5
0
 def get_hypernymy_relation_source(self):
     return knowledge.StaticRelationSource(self.wordnet_mapping)