| """ |
| Shared constants for the reasoning engine. |
| |
| All configurable thresholds, word sets, and user-facing strings |
| live here — single source of truth, no duplication across modules. |
| """ |
|
|
| |
| |
| ABSTAIN_MESSAGE = "I don't know." |
| ABSTAIN_OOV_MESSAGE = "I don't know — none of those words are in my vocabulary." |
|
|
| |
| |
| |
| |
| FUNCTION_WORDS = frozenset({ |
| "the", "a", "an", "is", "are", "was", "were", "be", "been", |
| "being", "have", "has", "had", "do", "does", "did", "will", |
| "would", "could", "should", "may", "might", "shall", "can", |
| "to", "of", "in", "for", "on", "with", "at", "by", "from", |
| "as", "into", "through", "during", "before", "after", "and", |
| "but", "or", "nor", "not", "no", "so", "yet", "both", |
| "it", "its", "this", "that", "these", "those", |
| "who", "what", "which", "where", "when", "how", "why", |
| }) |
|
|
| |
| |
| |
| STRUCTURAL_WORDS = FUNCTION_WORDS | frozenset({ |
| "wrote", "discovered", "invented", "created", "founded", |
| "born", "died", "lived", "made", "built", "designed", |
| }) |
|
|
| |
| |
| GRAMMAR_CONFIDENCE_THRESHOLD = 0.8 |
|
|
| |
| MAX_CONVERGENCE_JUMPS = 2 |
|
|
| |
| |
| QUERY_ANCHOR_FLOOR = 0.4 |
|
|
| |
| |
| PARAGRAPH_RELEVANCE_FLOOR = 0.5 |
|
|