Unified English Lexicon #
Provides unified lookup across all English word classes.
This module re-exports the specific lexicons and provides a unified
lookup function that searches across verbs, pronouns, nouns, etc.
Result of unified lexicon lookup.
Since different word classes have different entry types, we use a sum type.
- verb : Predicates.Verbal.VerbEntry → LexResult
- pronoun : Pronouns.PronounEntry → LexResult
- noun : Nouns.NounEntry → LexResult
- determiner : Determiners.QuantifierEntry → LexResult
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Convert a lookup result to a Word (for derivations).
Note: This picks a default form (e.g., 3sg for verbs, singular for nouns). For morphologically-aware parsing, use the specific entry functions.
Equations
Instances For
Look up a verb by any of its forms (infinitive, 3sg, past, etc.).
Equations
- One or more equations did not get rendered due to their size.
Instances For
Unified lookup across all word classes.
Searches in order: pronouns, determiners, verbs, nouns. (Pronouns and determiners first since they're closed classes.) Returns the first match found.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Look up multiple words, returning None if any lookup fails.
Equations
Instances For
Parse a sentence string into lexical entries.
Splits on whitespace and looks up each token.
Equations
- Fragments.English.Lexicon.parseSentence s = Fragments.English.Lexicon.lookupAll (List.filter (fun (x : String) => decide (x ≠ "")) s.splitOn)