# An FST script for regular English morphology # This provides for regular morphological realizations and alternations, aimed at stems # known to the LFG lexicon but not known to the standard inflectional transducer. A +Reg # tag is added at the end of every analysis, and must be present in the LFG lexicon, # presumably with an optimality mark. This can be used to avoid dispreferring regular # inflections for words known to the LFG lexicon, as opposed to stems that match -unknown. source /Users/kaplan/Desktop/morph-build/english/english.char.defs.infile # Get definitions of AsciiLC define Vowel [a|e|i|o|u]; define Consonant AsciiLC - Vowel ; define CatTag [ "+Verb" | "+Noun" | "+Adj" | "+Adv" ] ; define LowStem AsciiLC AsciiLC+ ; # 2 or more lower-case ascii # These could be defined more precisely as list of known stems, to build # an accurate morphology define VerbStem LowStem ; # {walk} | {stop} | {fake} ; define NounStem LowStem ; # {walk} | {dog} ; define AdjStem LowStem ; # {happy} | {true} ; # ============================================================= # Lexical side of inflected verbs, nouns, adjectives, adverbs # ============================================================= define VerbTags "+Verb" ["+Pres" ["+Non3sg"|"+3sg"] | "+Inf" | "+PastBoth" "+123SP" | "+Prog"]; define Verb VerbStem VerbTags ; define NounTags "+Noun" ["+Sg" | "+Pl"] ; define Noun NounStem NounTags ; define AdjTags "+Adj" ("+Comp"|"+Sup") ; define Adj AdjStem AdjTags ; define Adv AdjStem "+Adj" 0:{ly} "+Adv" ("+Comp"|"+Sup") ; # Build adverbs from adjectives, adding +Adj tag so i/y rules can apply # Lexical side shows that the adverb was derived from an adjective # Do adverbs take comparatives/superlatives? # ============================================ # Convert abstract tags to standard suffixes # ============================================ define RealizeVerb [ "+Pres" "+Non3sg" -> 0 , "+Inf" -> 0 , "+Pres" "+3sg" -> s , "+PastBoth" "+123SP" -> e d , "+Prog" -> i n g ] ; define RealizeNoun [ "+Sg" -> 0 , "+Pl" -> s ] ; define RealizeAdjAdv [ # No tag for uninflected adjectives/adverbs "+Comp" -> e r , "+Sup" -> e s t ] ; define Inflections [ [Verb .o. RealizeVerb] | [Noun .o. RealizeNoun] | [[Adj | Adv ] .o. RealizeAdjAdv] ] ; # ======================= # Morphographemic rules # ======================= # CatTag marks the stem/suffix boundary define SilentE e -> 0 || [ Consonant Vowel Consonant | i ] _ CatTag Vowel , [ c | g | u] _ CatTag [i|e] ; # dope->doping, tie, but not doope. judging, menacing, subdued define AddE [..] -> e || [s | z | s h | c h | x | y ] CatTag _ s ; # e added to suffix # clarify+s -> clarify+es, church+s -> church+es define HardC [..] -> k || c _ CatTag [i|e] ; # picnic+ing -> picnick+ing define Gem(let) [ Inflections.l # Impose constraint to avoid blow-ups # LowStem CatTag \[CatTag-"+Adv"]* # Model of the post-inflection strings .o. [..] -> let // Consonant Vowel let _ CatTag Vowel ] ; define Geminate Gem(b) | Gem(d) | Gem(f) | Gem(g) | Gem(k) | Gem(l) # bid+ing -> bidd+ing | Gem(m) | Gem(n) | Gem(p) | Gem(r) | Gem(s) | Gem(t) | Gem(v) ; define y2i y -> i || Consonant _ ["+Adj" l y | CatTag e ]; # happy+Adjly -> happi+Adjly # clarify+ed -> clarified, bury+ed -> buried, but not prey+ed # clarify+es -> clarifies, entry+es -> entries define i2y i -> y || _ CatTag i ; # tie+ing -> tying (e is deleted earlier) define Morphographemic Geminate .o. [SilentE|AddE|HardC] .o. [i2y|y2i] ; # ===================== # Assemble the pieces # ===================== define RegularMorphology [ [ Inflections .o. Morphographemic .o. CatTag -> 0 ] "+Reg":0 ] ; push RegularMorphology save english.morph.regular.fst quit