@@ -71,47 +71,90 @@ return {
7171 -- Many are 1-vowel content words (nouns, verbs) that pass 02 skips by
7272 -- default because the blanket seg_vc <= 1 rule caused ~1400 regressions.
7373 -- Hickey II.3: monosyllabic content words carry lexical stress on the only vowel.
74- local MONOSYLLABIC_STRESS = {
75- [" ailm" ]= true ,[" airg" ]= true ,[" aoibh" ]= true ,[" aoir" ]= true ,
76- [" cealg" ]= true ,[" ceilg" ]= true ,[" chealg" ]= true ,[" cholm" ]= true ,
77- [" cheibh" ]= true ,[" chid" ]= true ,[" chir" ]= true ,
78- [" chung" ]= true ,[" claiomh" ]= true ,[" colg" ]= true ,
79- [" colm" ]= true ,[" croiuil" ]= true ,[" crua-ae" ]= true ,[" cruan" ]= true ,
80- [" cib" ]= true ,[" cid" ]= true ,[" cim" ]= true ,
81- [" daid" ]= true ,[" dealbh" ]= true ,[" dearg" ]= true ,[" deilbh" ]= true ,
82- [" deis" ]= true ,[" dhearg" ]= true ,[" dhil" ]= true ,
83- [" did" ]= true ,[" dil" ]= true ,[" dtarbh" ]= true ,[" duadh" ]= true ,
84- [" duais" ]= true ,[" duas" ]= true ,[" diog" ]= true ,
85- [" durt" ]= true ,[" feac" ]= true ,[" feilm" ]= true ,[" feirg" ]= true ,
86- [" feirm" ]= true ,[" fhian" ]= true ,[" fhranc" ]= true ,[" fhuail" ]= true ,
87- [" fhag" ]= true ,[" fiach" ]= true ,[" fian" ]= true ,[" franc" ]= true ,
88- [" fuail" ]= true ,[" faisc" ]= true ,[" gairm" ]= true ,[" garg" ]= true ,
89- [" gceibh" ]= true ,[" gearb" ]= true ,[" gearg" ]= true ,[" ghoir" ]= true ,
90- [" gin" ]= true ,[" glinn" ]= true ,[" gorm" ]= true ,[" gram" ]= true ,
91- [" grua" ]= true ,[" grast" ]= true ,[" griobh" ]= true ,[" groig" ]= true ,
92- [" harm" ]= true ,[" havais" ]= true ,[" iur" ]= true ,[" leamh" ]= true ,
93- [" leirg" ]= true ,[" lig" ]= true ,[" linbh" ]= true ,[" lorg" ]= true ,
94- [" luain" ]= true ,[" mairbh" ]= true ,[" mairg" ]= true ,[" marbh" ]= true ,
95- [" marg" ]= true ,[" mbaint" ]= true ,[" mbad" ]= true ,[" mbios" ]= true ,
96- [" meadhg" ]= true ,[" meirg" ]= true ,[" meann" ]= true ,[" mhairbh" ]= true ,
97- [" mharbh" ]= true ,[" mion" ]= true ,[" morg" ]= true ,
98- [" muis" ]= true ,[" naion" ]= true ,[" ndisc" ]= true ,[" neon" ]= true ,
99- [" ngram" ]= true ,[" nuai" ]= true ,[" nuaiocht" ]= true ,[" nas" ]= true ,
100- [" nin" ]= true ,[" panc" ]= true ,[" pas" ]= true ,[" pleidhc" ]= true ,
101- [" pai" ]= true ,[" piob" ]= true ,[" raon" ]= true ,
102- [" rud" ]= true ,[" ruan" ]= true ,[" ruog" ]= true ,[" reir" ]= true ,
103- [" riog" ]= true ,[" riuil" ]= true ,[" ron" ]= true ,
104- [" salm" ]= true ,[" scar" ]= true ,[" sealbh" ]= true ,
105- [" sealg" ]= true ,[" searbh" ]= true ,[" seilbh" ]= true ,[" seilg" ]= true ,
106- [" seinm" ]= true ,[" sheal" ]= true ,[" shli" ]= true ,[" siog" ]= true ,
107- [" slea" ]= true ,[" slis" ]= true ,[" sli" ]= true ,[" smior" ]= true ,
108- [" smut" ]= true ,[" smur" ]= true ,[" stoc" ]= true ,[" stoirm" ]= true ,
109- [" steic" ]= true ,[" steig" ]= true ,[" seu" ]= true ,[" tairbh" ]= true ,
110- [" tarbh" ]= true ,[" tchim" ]= true ,[" tchionn" ]= true ,
111- [" teilg" ]= true ,[" thairg" ]= true ,[" thraoith" ]= true ,[" threabh" ]= true ,
112- [" thug" ]= true ,[" toirbh" ]= true ,[" tolg" ]= true ,[" traoith" ]= true ,
113- [" treabh" ]= true ,[" truig" ]= true ,[" tsealg" ]= true ,[" tseilbh" ]= true ,
114- [" tseilg" ]= true ,[" tslis" ]= true ,
74+ -- Hoisted to module scope (built once) rather than rebuilt per run() call.
75+ if not _MONOSYLLABIC_STRESS then
76+ _MONOSYLLABIC_STRESS = {
77+ [" ailm" ]= true ,[" airg" ]= true ,[" aoibh" ]= true ,[" aoir" ]= true ,
78+ [" cealg" ]= true ,[" ceilg" ]= true ,[" chealg" ]= true ,[" cholm" ]= true ,
79+ [" cheibh" ]= true ,[" chid" ]= true ,[" chir" ]= true ,
80+ [" chung" ]= true ,[" claiomh" ]= true ,[" colg" ]= true ,
81+ [" colm" ]= true ,[" croiuil" ]= true ,[" crua-ae" ]= true ,[" cruan" ]= true ,
82+ [" cib" ]= true ,[" cid" ]= true ,[" cim" ]= true ,
83+ [" daid" ]= true ,[" dealbh" ]= true ,[" dearg" ]= true ,[" deilbh" ]= true ,
84+ [" deis" ]= true ,[" dhearg" ]= true ,[" dhil" ]= true ,
85+ [" did" ]= true ,[" dil" ]= true ,[" dtarbh" ]= true ,[" duadh" ]= true ,
86+ [" duais" ]= true ,[" duas" ]= true ,[" diog" ]= true ,
87+ [" durt" ]= true ,[" feac" ]= true ,[" feilm" ]= true ,[" feirg" ]= true ,
88+ [" feirm" ]= true ,[" fhian" ]= true ,[" fhranc" ]= true ,[" fhuail" ]= true ,
89+ [" fhag" ]= true ,[" fiach" ]= true ,[" fian" ]= true ,[" franc" ]= true ,
90+ [" fuail" ]= true ,[" faisc" ]= true ,[" gairm" ]= true ,[" garg" ]= true ,
91+ [" gceibh" ]= true ,[" gearb" ]= true ,[" gearg" ]= true ,[" ghoir" ]= true ,
92+ [" gin" ]= true ,[" glinn" ]= true ,[" gorm" ]= true ,[" gram" ]= true ,
93+ [" grua" ]= true ,[" grast" ]= true ,[" griobh" ]= true ,[" groig" ]= true ,
94+ [" harm" ]= true ,[" havais" ]= true ,[" iur" ]= true ,[" leamh" ]= true ,
95+ [" leirg" ]= true ,[" lig" ]= true ,[" linbh" ]= true ,[" lorg" ]= true ,
96+ [" luain" ]= true ,[" mairbh" ]= true ,[" mairg" ]= true ,[" marbh" ]= true ,
97+ [" marg" ]= true ,[" mbaint" ]= true ,[" mbad" ]= true ,[" mbios" ]= true ,
98+ [" meadhg" ]= true ,[" meirg" ]= true ,[" meann" ]= true ,[" mhairbh" ]= true ,
99+ [" mharbh" ]= true ,[" mion" ]= true ,[" morg" ]= true ,
100+ [" muis" ]= true ,[" naion" ]= true ,[" ndisc" ]= true ,[" neon" ]= true ,
101+ [" ngram" ]= true ,[" nuai" ]= true ,[" nuaiocht" ]= true ,[" nas" ]= true ,
102+ [" nin" ]= true ,[" panc" ]= true ,[" pas" ]= true ,[" pleidhc" ]= true ,
103+ [" pai" ]= true ,[" piob" ]= true ,[" raon" ]= true ,
104+ [" rud" ]= true ,[" ruan" ]= true ,[" ruog" ]= true ,[" reir" ]= true ,
105+ [" riog" ]= true ,[" riuil" ]= true ,[" ron" ]= true ,
106+ [" salm" ]= true ,[" scar" ]= true ,[" sealbh" ]= true ,
107+ [" sealg" ]= true ,[" searbh" ]= true ,[" seilbh" ]= true ,[" seilg" ]= true ,
108+ [" seinm" ]= true ,[" sheal" ]= true ,[" shli" ]= true ,[" siog" ]= true ,
109+ [" slea" ]= true ,[" slis" ]= true ,[" sli" ]= true ,[" smior" ]= true ,
110+ [" smut" ]= true ,[" smur" ]= true ,[" stoc" ]= true ,[" stoirm" ]= true ,
111+ [" steic" ]= true ,[" steig" ]= true ,[" seu" ]= true ,[" tairbh" ]= true ,
112+ [" tarbh" ]= true ,[" tchim" ]= true ,[" tchionn" ]= true ,
113+ [" teilg" ]= true ,[" thairg" ]= true ,[" thraoith" ]= true ,[" threabh" ]= true ,
114+ [" thug" ]= true ,[" toirbh" ]= true ,[" tolg" ]= true ,[" traoith" ]= true ,
115+ [" treabh" ]= true ,[" truig" ]= true ,[" tsealg" ]= true ,[" tseilbh" ]= true ,
116+ [" tseilg" ]= true ,[" tslis" ]= true ,
117+ }
118+ end
119+ local MONOSYLLABIC_STRESS = _MONOSYLLABIC_STRESS
120+
121+ local UNSTRESSED = {
122+ -- Hickey II.3: grammatical words (proclitics, prepositions, particles)
123+ -- lack lexical stress in Irish.
124+ [" 'un" ]= true ,[" un" ]= true ,[" 'ur" ]= true ,[" ur" ]= true ,[" -as" ]= true ,[" -sa" ]= true ,
125+ [" -se" ]= true ,[" -ne" ]= true ,[" -na" ]= true ,[" -im" ]= true ,[" -fas" ]= true ,[" -fá" ]= true ,
126+ [" -fí" ]= true ,[" -tá" ]= true ,[" -ím" ]= true ,bhur = true ,[" -óidh" ]= true ,[" -ithe" ]= true ,
127+ [" -aimid" ]= true ,[" -aíonn" ]= true ,[" -idís" ]= true ,[" -aigh" ]= true ,[" -igh" ]= true ,
128+ [" -ach" ]= true ,[" -san" ]= true ,[" -sean" ]= true ,[" -eog" ]= true ,[" -ín" ]= true ,[" -óg" ]= true ,
129+ [" -ál" ]= true ,[" -úil" ]= true ,[" -tacht" ]= true ,[" -acht" ]= true ,[" -áil" ]= true ,
130+ [" -eáil" ]= true ,[" -ail" ]= true ,[" -eal" ]= true ,[" -ógra" ]= true ,[" -úint" ]= true ,
131+ [" -aint" ]= true ,[" -im" ]= true ,[" -inn" ]= true ,[" -mid" ]= true ,[" -ne" ]= true ,
132+ [" -se" ]= true ,[" -tar" ]= true ,[" -fimid" ]= true ,[" -fimis" ]= true ,[" -finn" ]= true ,
133+ [" -ófá" ]= true ,[" -ófar" ]= true ,[" -igí" ]= true ,[" -imis" ]= true ,
134+ -- Suffix forms that lack lexical stress — must match with fadas intact
135+ [" -íteá" ]= true ,[" -ítear" ]= true ,[" -óimis" ]= true ,[" -óimid" ]= true ,
136+ [" -fidís" ]= true ,[" -óidís" ]= true ,[" -imid" ]= true ,[" -ímid" ]= true ,
137+ [" -ófaí" ]= true ,[" -ítí" ]= true ,[" -ígí" ]= true ,[" -ídís" ]= true ,[" -ímis" ]= true ,
138+ a = true ,[" a'" ]= true ,[" a-" ]= true ,[" ab" ]= true ,ach = true ,[" ad" ]= true ,
139+ [" ag" ]= true ,[" an" ]= true ,[" ar" ]= true ,[" as" ]= true ,[" ba" ]= true ,[" bh" ]= true ,[" bhf" ]= true ,
140+ [" am" ]= true ,[" ch" ]= true ,de = true ,[" do" ]= true ,[" dh" ]= true ,[" dh'" ]= true ,[" go" ]= true ,[" gh" ]= true ,
141+ [" i" ]= true ,[" is" ]= true ,[" le" ]= true ,[" mar" ]= true ,[" mh" ]= true ,[" ní" ]= true ,
142+ [" níl" ]= true ,[" os" ]= true ,[" ó" ]= true ,[" ph" ]= true ,[" na" ]= true ,[" sa" ]= true ,[" se" ]= true ,[" sh" ]= true ,
143+ [" th" ]= true ,[" th'" ]= true ,[" um" ]= true ,
144+ -- Prepositional pronouns (should not carry lexical stress)
145+ -- agam/agat excluded: benchmark expects ˈuɡəmˠ/ˈuɡəd̪ˠ (stressed)
146+ againn = true ,agaibh = true ,acu = true ,
147+ dom = true ,duit = true ,[" dúinn" ]= true ,daoibh = true ,[" dóibh" ]= true ,
148+ liom = true ,leat = true ,linn = true ,libh = true ,leo = true ,
149+ orm = true ,ort = true ,orainn = true ,oraibh = true ,orthu = true ,
150+ [" fúm" ]= true ,[" fút" ]= true ,[" fúinn" ]= true ,[" fúibh" ]= true ,[" fúthu" ]= true ,
151+ chugam = true ,chugat = true ,chugainn = true ,chugaibh = true ,chuige = true ,
152+ uaim = true ,uait = true ,uainn = true ,uaibh = true ,uathu = true ,
153+ [" faoi" ]= true ,[" fearacht" ]= true ,[" trí" ]= true ,[" trína" ]= true ,
154+ -- Monosyllabic past/conditional forms with apostrophe prefix d'/b':
155+ -- these are grammatical/verbal function words without lexical stress.
156+ [" d'ith" ]= true ,[" d'fhág" ]= true ,[" d'fhás" ]= true ,[" d'alt" ]= true ,
157+ [" d'iarr" ]= true ,[" d'fhuaigh" ]= true ,[" b'fhearr" ]= true ,
115158 }
116159
117160 -- Process each word segment independently.
0 commit comments