Expand description
MegaHAL keyword extraction: two-pass algorithm with swap table, banned/auxiliary word lists.
Keywords drive MegaHAL’s reply generation by biasing the Markov walk toward topically relevant symbols. Extraction works in two passes:
- Primary: select words from input (after swap substitution) that are in the model dictionary, start with an alphanumeric character, and are neither banned nor auxiliary.
- Auxiliary: if at least one primary keyword was found, also add words from the auxiliary list (pronouns, possessives) that appear in input.
Structs§
- Keyword
Config - Configuration for keyword extraction.
- Swap
Table - Perspective-swapping substitution table.
Functions§
- extract_
keywords - Extract keywords from tokenized input per the MegaHAL two-pass algorithm.
- word_
in_ dict - Check if a given string exists in the model dictionary.