Nasty.Language.Spanish.QAConfig (Nasty v0.3.0)

View Source

Configuration for Spanish Question Answering (QA).

Provides Spanish question patterns, answer type mappings, and keywords for the generic QA engine.

Spanish Question Types

  • Qué (what): entities, objects
  • Quién (who): people
  • Dónde (where): locations
  • Cuándo (when): times, dates
  • Por qué (why): reasons, causes
  • Cómo (how): manner, methods
  • Cuál (which): choices
  • Cuánto (how much/many): quantities

Example

iex> config = QAConfig.get()
iex> config.question_patterns.who
["¿quién", "quien", "quiénes", "quienes"]

Summary

Functions

Returns Spanish QA configuration for use by the generic QA engine.

Returns the expected answer type for a question type.

Identifies the question type from a Spanish question string.

Functions

config()

@spec config() :: map()

Returns Spanish QA configuration for use by the generic QA engine.

get_answer_type(question_type)

@spec get_answer_type(atom()) :: atom()

Returns the expected answer type for a question type.

identify_question_type(question)

@spec identify_question_type(String.t()) :: atom() | nil

Identifies the question type from a Spanish question string.