Nasty.Operations.QA.QAEngine (Nasty v0.3.0)
View SourceGeneric Question Answering engine.
Coordinates the full QA pipeline:
- Classify question → identify type and expected answer
- Score sentences → rank by relevance
- Extract candidates → find answers in top sentences
- Sort and filter → return top N answers
Summary
Functions
Answers a question from a document.
Functions
@spec answer( Nasty.AST.Document.t(), Nasty.Operations.QA.QuestionClassifier.t(), map(), keyword() ) :: [ Nasty.AST.Answer.t() ]
Answers a question from a document.
Options
:max_answers- Maximum number of answers to return (default: 3):min_confidence- Minimum confidence threshold (default: 0.1):max_sentences- Maximum sentences to extract from (default: 10)
Returns
List of Answer structs, sorted by confidence (highest first)