client api #58

Closed
enriquepablo opened this Issue Oct 27, 2012 · 0 comments

Comments

Projects
None yet
1 participant
Owner

enriquepablo commented Oct 27, 2012

The client api:

server = KBServer('address')

person = are('person', thing)
john = isa('john', person)
kb1 = import_kb('http://...')

fact1 = fact(john, kb1.loves, who=isa('yoko', person))

server.tell(fact1)

Person1 = isa('Person1', person)

fact2 = fact(john, kb1.loves, who=Person1)

resp = server.ask(fact2)

assert( resp[0]['Person1'] == 'yoko' )

enriquepablo was assigned Oct 27, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment