Nasty.Operations.QA.AnswerSelector (Nasty v0.3.0)
View SourceGeneric answer candidate extraction for Question Answering.
Extracts answer candidates from sentences based on question type:
- Entity-based answers (person, location, organization)
- Temporal answers (dates, years, times)
- Number/quantity answers
- Clause-based answers (reason, manner)
- Noun phrase answers (fallback)
Summary
Types
Language configuration for answer selection.
Functions
Extracts answer candidates from a sentence based on question analysis.
Types
Language configuration for answer selection.
Required fields:
temporal_patterns- List of regex patterns for temporal expressionstemporal_keywords- List of temporal keywords (year, month, day, etc.)
Functions
@spec extract_candidates( Nasty.AST.Sentence.t(), integer(), Nasty.Operations.QA.QuestionClassifier.t(), float(), Nasty.AST.Document.t(), language_config() ) :: [Nasty.AST.Answer.t()]
Extracts answer candidates from a sentence based on question analysis.
Returns a list of Answer structs with confidence scores.