mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-05-27 08:58:55 -06:00
(Hun) Handle back harmony words that end in i
Also use multiword split just in case some grammar uses these opers directly.
This commit is contained in:
@@ -407,6 +407,8 @@ oper
|
||||
|
||||
front_rounded : pattern Str = #("ö" | "ő" | "ü" | "ű") ;
|
||||
|
||||
i : pattern Str = #("i"|"í") ;
|
||||
|
||||
-- front and back rounded
|
||||
-- rounded : pattern Str = #("ö" | "ő" | "ü" | "ű" | "o" | "ó" | "u" | "ú")
|
||||
|
||||
@@ -475,12 +477,11 @@ oper
|
||||
|
||||
-- Function to get a harmony from any string
|
||||
getHarm : Str -> Harm = \s ->
|
||||
let lastWord : Str = case s of {
|
||||
x + " " + y => y ;
|
||||
_ => s } ;
|
||||
let lastWord : Str = (splitMultiword s).p2 ; -- only include last word
|
||||
in case lastWord of {
|
||||
_ + #back + _ => H_a ;
|
||||
_ + #front_rounded + (#c|"") + (#c|"") => H_o ;
|
||||
_ + #back + (#c|#i)* => H_a ; -- papír, gumi, zokni: back harmony
|
||||
-- NB. wrong harmony for farmer.
|
||||
_ + #front_rounded + (#c)* => H_o ; -- matches nő, not rövid.
|
||||
_ => H_e
|
||||
} ;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user