keiffster / program-y

Python 3.x based AIML 2.0 Chatbot interpreter, framework, related programs and knowledge files
https://keiffster.github.io/program-y/
Other
348 stars 138 forks source link

How to search RDF with the same subject and object to get mutliple results ? #175

Closed chungyilinxrspace closed 5 years ago

chungyilinxrspace commented 5 years ago

How to search RDF with the same subject and object to get mutliple results ?

Expected Behavior

In my AIML , using the following query to search "ACTOR isa ?x"

<set var='result'>
    <select>
        <vars>?x</vars>
        <q>
             <subj>ACTOR</subj>
             <pred>isa</pred>
             <obj>?x</obj></q>
    </select>
</set>
<get var='result'/>

expect the results are :

[[["?x", "ISA"], ["?y", "Person"]], [["?x", "ISA"], ["?y", "Man"]]]

Current Behavior

but return

[[["?x", "ISA"], ["?y", "Person"]]]

Thank you very much ~!

keiffster commented 5 years ago

RDF spec is none too clear, I had to reverse engineer the entire thing from scratch

What you have reported seems sensible and would probably be required, I'll work on a fix over the next few days and published asap

chungyilinxrspace commented 5 years ago

Thank you very much ! Have a nice day ~!

keiffster commented 5 years ago

This has now been fixed and all tests now passing. I've just pushed the fix to master. Enjoy !