Did you know ... Search Documentation:
Pack bousi_pack -- prolog/source/translator.pl
PublicShow source
 translate_program(+InputProgram, +InputOntology, +OutputFile, +StateFile)
Reads a Bousi-Prolog program together with a Bousi-Prolog ontology, performs a lexical, syntactic and semantic analysis, and generates an intermediate TPL file that can directly be loaded into Prolog. InputOntology can be '' (an empty string) if no ontology is needed. Current flags are saved in StateFile.

If the compilation of the program or the ontology causes an error, this predicate will fail and won't generate anything.

 translate_query(+String, -Query, -Bindings, -Degree)
Reads the query contained in String, performs a lexical, syntactic and semantic analysis, and returns the following:
  • A term that can be used to execute the query.
  • A list with the variable bindings (bindings of variables starting with an underscore character are not returned).
  • The variable in which the approximation degree of the query will be stored after launching it.

If the translation of the query causes an error, this predicate will fail.