1

What is the best way to store and query heterogeneous facts and rules in DB or other store .

For example :

https://www.swi-prolog.org/pack/list?p=db_facts

allows you to store homogeneous facts where you have to create table for every different structure.

Facts examples :

  fun1(a,b)
  fun1(a,b,c)
  fun2(d,m,[k,j,o,p])
  fun4(fun0(g,c),a,fun8(r,p))
  fun2(d,fun6(m,k,j))
  fun56(g,k,[o,p,e,s])

If possible I want to be able to store rules too, not 100% but good to have. What about querying rule directly in the DB.

PS> As a plus it will be good if I can populate this store from a separate program written in different language. /python/

What I'm trying to do is parse large text files where every sentence becomes a fact. Later I want to filter this factdb/s and get back only part of the facts to store in another file/db.

So that initial DB is big read only and the result is moderate but i have to still save it to a file/db.

I want to be able to generate this fact db from outside because prolog does not have the NLP tools for the task

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
sten
  • 7,028
  • 9
  • 41
  • 63

0 Answers0