BayesianLogic / blog

The BLOG programming language
http://bayesianlogic.github.io/
BSD 4-Clause "Original" or "Old" License
98 stars 31 forks source link

observation generators #255

Open cberzan opened 10 years ago

cberzan commented 10 years ago

For the future. This documents discussion with @lileicc about how to provide evidence in a generic way.

We settled on a syntax like obs Generator(arg1, arg2, ...);, where Generator is a java / scala object that knows how to build a bunch of obs statements. We can provide a few built-in evidence generators for common use cases, e.g. CSVReader("file.csv"). Advanced users can also write their own evidence generators by implementing the proper interface.

The evidence generator object should be able to produce arbitrary observations, not restricted to a single type. E.g. obs AdvisingReln(); might generate several observations of the form obs Advises(P1, S2); where P1 is of type Professor and S2 is of type Student.

The evidence generator object can generate observations from any source, e.g. file, db, google search, etc. To allow this flexibility, the generator has to be written in java / scala, not in blog itself.