View Source Guesswork (Guesswork v0.8.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
@spec query(Guesswork.Ast.Statement.t(), integer(), Guesswork.Query.opts_list()) :: Guesswork.Answer.Result.t()
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:
:label
- Traverses plural entities looking for a specific answer sets. If a list of strings is provided only the supplied variables are traversed. The default value isfalse
.:knowledge_base
(term/0
) - TheGuesswork.KnowledgeBase
used to resolve queries. The default value isGuesswork.EmptyCollection
.:query_id
(String.t/0
) - The id used to report telemetry. Defaults to a newUUID
(v4).:precompute_count
(integer/0
) - The number of answer sets to compute when resolving a fact. This allows repeated facts (that would result in the same matches) to reuse computation. Note that, with recusive queries, this can lead to infinate searches. The default value is0
.