From 7ba3842ceda8d595c89e934c38fe492ac5bdf588 Mon Sep 17 00:00:00 2001 From: Inari Listenmaa Date: Mon, 22 Jun 2020 07:38:41 +0200 Subject: [PATCH] (Hun) For multiwords, get harmony of the last word. --- src/hungarian/NounMorphoHun.gf | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/hungarian/NounMorphoHun.gf b/src/hungarian/NounMorphoHun.gf index 3b5408983..a3dbfd9b3 100644 --- a/src/hungarian/NounMorphoHun.gf +++ b/src/hungarian/NounMorphoHun.gf @@ -471,10 +471,14 @@ oper } ; -- Function to get a harmony from a string - getHarm : Str -> Harm = \s -> case s of { - _ + #back + _ => H_a ; - _ + #front_rounded + (#c|"") + (#c|"") => H_o ; - _ => H_e + getHarm : Str -> Harm = \s -> + let lastWord : Str = case s of { + x + " " + y => y ; + _ => s } ; + in case lastWord of { + _ + #back + _ => H_a ; + _ + #front_rounded + (#c|"") + (#c|"") => H_o ; + _ => H_e } ; -- Used as a table of allomorphs for a give case.