Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

json ast & interchange #47

Closed
enriquepablo opened this Issue · 2 comments

1 participant

@enriquepablo
Owner

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 enriquepablo was assigned
@enriquepablo

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

@enriquepablo

not json, ast nodes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.