Beispiel #1
0
def demonstrate_relations_tuples_by_concepts():
    concepts = ['/c/en/person', '/c/en/human', '/c/en/animal', '/c/en/creature']
    relations = []
    p = Path(concepts, relations)
    relations_tuples = p.get_all_tuples_of_relations()
    for t in relations_tuples:
        print t
def demonstrate_relations_tuples_by_concepts():
    concepts = [
        '/c/en/person', '/c/en/human', '/c/en/animal', '/c/en/creature'
    ]
    relations = []
    p = Path(concepts, relations)
    relations_tuples = p.get_all_tuples_of_relations()
    for t in relations_tuples:
        print t
def demonstrate_concepts_tuples_by_relations():
    concepts = ['/c/en/cat', '/c/en/animal', '/c/en/living']
    #relations = ['/r/IsA', '/r/HasProperty', '/r/AtLocation', '/r/LocatedNear']
    #relations = ['/r/HasPrerequisite', '/r/HasSubevent']
    #relations = ['/r/HasPrerequisite', '/r/HasFirstSubevent']
    relations = ['/r/ReceivesAction', '/r/HasProperty']
    p = Path(concepts, relations)
    concepts_tuples = p.get_all_tuples_of_concepts()
    pprint_paths(sys.stdout, concepts_tuples)
Beispiel #4
0
def demonstrate_concepts_tuples_by_relations():
    concepts = ['/c/en/cat', '/c/en/animal', '/c/en/living']
    #relations = ['/r/IsA', '/r/HasProperty', '/r/AtLocation', '/r/LocatedNear']
    #relations = ['/r/HasPrerequisite', '/r/HasSubevent']
    #relations = ['/r/HasPrerequisite', '/r/HasFirstSubevent']
    relations = ['/r/ReceivesAction', '/r/HasProperty']
    p = Path(concepts, relations)
    concepts_tuples = p.get_all_tuples_of_concepts()
    pprint_paths(sys.stdout, concepts_tuples)
Beispiel #5
0
def demonstrate_path_existence_check():
    concepts = ['/c/en/thunder', '/c/en/noise', '/c/en/sound', '/c/en/loud']
    relations = ['/r/IsA', '/r/HasProperty', '/r/HasProperty'] 
    p = Path(concepts, relations)
    p.print_path()  
    print 'Asking path existence...'
    exist = p.does_exist(print_where_breaks=True)
    if exist:
        print 'Path exist'
def demonstrate_path_existence_check():
    concepts = ['/c/en/thunder', '/c/en/noise', '/c/en/loud']
    #concepts = ['/c/en/thunder', '/c/en/noise', '/c/en/sound', '/c/en/loud']
    relations = ['/r/IsA', '/r/HasProperty']
    p = Path(concepts, relations)
    p.print_path()
    print 'Asking path existence...'
    exist = p.does_exist(print_where_breaks=True)
    if exist:
        print 'Path exist'
Beispiel #7
0
def demonstrate_relations_tuples_by_concepts():
    concepts = ['/c/en/person', '/c/en/human', '/c/en/animal']
    relations = ['/r/IsA', '/r/HasProperty', '/r/HasProperty'] 
    p = Path(concepts, relations)
    relations_tuples = p.get_all_tuples_of_relations()
    print relations_tuples
Beispiel #8
0
def demonstrate_concepts_tuples_by_relations():
    concepts = ['/c/en/cat', '/c/en/animal', '/c/en/living']
    relations = ['/r/IsA', '/r/HasProperty', '/r/HasProperty'] 
    p = Path(concepts, relations)
    concepts_tuples = p.get_all_tuples_of_concepts()
    pprint_paths(sys.stdout, concepts_tuples)