Reasoning fails: Individual name expected in the getRoleFillers()

Issue #3 closed
Evgeny Blokhin created an issue

Sorry for jumping the gun, Artur! Yes, probably it is well-known and related to #55 and #76. E.g. a query with isFatherOf (no reasoning) in factpp/ontologies/tsars.rdf works, whereas a query with hasFather (owl:inverseOf isFatherOf) fails:

terminate called after throwing an instance of 'EFaCTPlusPlus'
  what():  Individual name expected in the getRoleFillers()
Aborted (core dumped)

Comments (4)

  1. wrobell repo owner

    This is probably because parser does not support all predicates in the tsars ontology. All will try to tackle this as soon as I finish the zebra puzzle example.

    Can I ask you to provide the two working queries (for isFatherOf and hasFather)?

  2. Evgeny Blokhin reporter
    import factpp.rdflib
    from rdflib import ConjunctiveGraph
    
    graph = ConjunctiveGraph(store=factpp.rdflib.Store())
    graph.parse('factpp/ontologies/tsars.rdf', format='xml')
    
    print("No reasoning:")
    for row in graph.query("""SELECT ?s ?o WHERE { ?s <http://www.example.com/genealogy.owl#isFatherOf> ?o . }"""):
        print(row)
    
    print("InverseOf:")
    for row in graph.query("""SELECT ?s ?o WHERE { ?s <http://www.example.com/genealogy.owl#hasFather> ?o . }"""):
        print(row)
    
  3. wrobell repo owner

    The issue shall be fixed with commit c3b02b77.

    Please note that RDFLib store is dropped from factpp library. Use Coras project instead. The projects needs bit more polishing, so please give it some time.

  4. Log in to comment