View Source Guesswork (Guesswork v0.5.0)

Guesswork allows the creation of logical statements and knowledge databases which then can be used together to figure out answers to questions stated in those logical systems.

Summary

Functions

Takes a logical statement, a knowledge base, and a target number of answer sets, and then returns all entity bindings for which the statement is true, according to the knowledge base.

Functions

Link to this function

query(statement, n, opts \\ [])

View Source

Takes a logical statement, a knowledge base, and a target number of answer sets, and then returns all entity bindings for which the statement is true, according to the knowledge base.

Available Options:

  • :knowledge_base (term/0) - The Guesswork.KnowledgeBase used to resolve queries. The default value is Guesswork.EmptyCollection.

  • :query_id (String.t/0) - The id used to report telemetry. Defaults to a new UUID (v4).

  • :precompute_count (integer/0) - How many answer sets to precmpute, shuffle, and share when queries have repeated fact statements that result in the same matches and substitutions. The default value is 100.