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

View Source

English-specific configuration for Question Answering.

Provides:

  • Question word mappings (who, what, when, etc.)
  • Auxiliary verbs for yes/no questions
  • Stop words for keyword extraction
  • Temporal patterns and keywords

Summary

Functions

Returns the list of auxiliary verbs for yes/no questions.

Returns the complete configuration map for use with generic QA modules.

Returns the list of POS tags for content words.

Checks if an answer type expects a specific entity type.

Returns the map of question words to {type, answer_type}.

Returns the list of stop words.

Returns temporal keywords.

Returns temporal expression patterns.

Functions

auxiliary_verbs()

@spec auxiliary_verbs() :: [String.t()]

Returns the list of auxiliary verbs for yes/no questions.

config()

@spec config() :: map()

Returns the complete configuration map for use with generic QA modules.

content_pos_tags()

@spec content_pos_tags() :: [atom()]

Returns the list of POS tags for content words.

expects_entity_type?(answer_type, entity_type)

@spec expects_entity_type?(atom(), atom()) :: boolean()

Checks if an answer type expects a specific entity type.

Used by question classifier to match expected answers with entities.

question_words()

@spec question_words() :: map()

Returns the map of question words to {type, answer_type}.

stop_words()

@spec stop_words() :: [String.t()]

Returns the list of stop words.

temporal_keywords()

@spec temporal_keywords() :: [String.t()]

Returns temporal keywords.

temporal_patterns()

@spec temporal_patterns() :: [Regex.t()]

Returns temporal expression patterns.