json ast & interchange #47

Closed
enriquepablo opened this Issue Oct 9, 2012 · 2 comments

Comments

Projects
None yet
1 participant
Owner

enriquepablo commented Oct 9, 2012

Make a Compiler that takes json and treats the db. KnowledgeBase uses the compiler and does not touch the db; parser produces json.

A rest interface talks json with the kb.

enriquepablo was assigned Oct 9, 2012

Owner

enriquepablo commented Oct 25, 2012

Divide KnowledgeBase in KnowledgeBase and Compiler.

Compiler parses terms and produces json.

KnowledgeBase consumes json or terms... json for what? just terms text/plain

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' )

Owner

enriquepablo commented Oct 27, 2012

not json, ast nodes

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