From b0cbba9e0de788a3c3ff5f3819aa6c91b140fe9f Mon Sep 17 00:00:00 2001 From: krasimir Date: Thu, 7 May 2009 07:41:38 +0000 Subject: Turkish: some more nouns in the lexicon and some work on the paradigms. still not complete --- next-lib/src/turkish/ResTur.gf | 73 +++++++++++++++++++++++++++--------------- 1 file changed, 47 insertions(+), 26 deletions(-) (limited to 'next-lib/src/turkish/ResTur.gf') diff --git a/next-lib/src/turkish/ResTur.gf b/next-lib/src/turkish/ResTur.gf index e2cb748c6..baacf68a7 100644 --- a/next-lib/src/turkish/ResTur.gf +++ b/next-lib/src/turkish/ResTur.gf @@ -4,8 +4,11 @@ resource ResTur = ParamX ** open Prelude, Predef in { --2 For $Noun$ + flags + coding=utf8 ; + param - Case = Nom | Acc | Dat | Gen | Loc | Ablat | Abess ; + Case = Nom | Acc | Dat | Gen | Loc | Ablat | Abess Polarity ; Species = Indef | Def ; @@ -60,48 +63,66 @@ resource ResTur = ParamX ** open Prelude, Predef in { oper harmony4 : Str -> Str -> Str - = \base,suffix0 -> - let c : Str = - case base of { - _+c@("ı"|"a"|"i"|"e"|"u"|"o"|"ü"|"ö")+ - ("b"|"v"|"d"|"z"|"j"|"c"|"g"|"ğ"|"l"|"r"|"m"|"n"|"y"|"p"|"f"|"t"|"s"|"ş"|"ç"|"k"|"h")* => c ; - _ => error "harmony4" - } ; + = \base0,suffix0 -> + let buffer : Str = + case dp 1 base0 + take 1 suffix0 of { + ("ı"|"a"|"i"|"e"|"u"|"o"|"ü"|"ö")+("ı"|"a"|"i"|"e"|"u"|"o"|"ü"|"ö") => "y" ; + _ => "" + } ; h : Str = - case c of { - ("ı"|"a") => "ı" ; - ("i"|"e") => "i" ; - ("u"|"o") => "u" ; - ("ü"|"ö") => "ü" + case base0 of { + _+c@("ı"|"a"|"i"|"e"|"u"|"o"|"ü"|"ö")+ + ("b"|"v"|"d"|"z"|"j"|"c"|"g"|"ğ"|"l"|"r"|"m"|"n"|"y"|"p"|"f"|"t"|"s"|"ş"|"ç"|"k"|"h")* => + case c of { + ("ı"|"a") => "ı" ; + ("i"|"e") => "i" ; + ("u"|"o") => "u" ; + ("ü"|"ö") => "ü" + } ; + _ => error ("harmony4") } ; + base : Str = + case dp 1 base0 + take 1 suffix0 of { + ("k")+("ı"|"a"|"i"|"e"|"u"|"o"|"ü"|"ö") => tk 1 base0 + "ğ" ; + _ => base0 + } ; suffix : Str = case suffix0 of { s1@(("b"|"v"|"d"|"z"|"j"|"c"|"g"|"ğ"|"l"|"r"|"m"|"n"|"y"|"p"|"f"|"t"|"s"|"ş"|"ç"|"k"|"h")*) - + ("ı"|"a"|"i"|"e"|"u"|"o"|"ü"|"ö") + + ("ı"|"i"|"u"|"ü") +s2 => s1+h+s2 ; s => s } - in base + suffix ; + in base + buffer + suffix ; harmony2 : Str -> Str -> Str = \base,suffix0 -> - let c : Str = + let buffer : Str = + case dp 1 base + take 1 suffix0 of { + ("ı"|"a"|"i"|"e"|"u"|"o"|"ü"|"ö")+("ı"|"a"|"i"|"e"|"u"|"o"|"ü"|"ö") => "n" ; + _ => "" + } ; + h : Str = case base of { _+c@("ı"|"a"|"i"|"e"|"u"|"o"|"ü"|"ö")+ - ("b"|"v"|"d"|"z"|"j"|"c"|"g"|"ğ"|"l"|"r"|"m"|"n"|"y"|"p"|"f"|"t"|"s"|"ş"|"ç"|"k"|"h")* => c ; + ("b"|"v"|"d"|"z"|"j"|"c"|"g"|"ğ"|"l"|"r"|"m"|"n"|"y"|"p"|"f"|"t"|"s"|"ş"|"ç"|"k"|"h")* => + case c of { + ("a"|"ı"|"u"|"o") => "a" ; + ("e"|"i"|"ü"|"ö") => "e" + } ; _ => error "harmony2" } ; - h : Str = - case c of { - ("a"|"ı"|"u"|"o") => "a" ; - ("e"|"i"|"ü"|"ö") => "e" - } ; - suffix : Str = + suffix1 : Str = case suffix0 of { s1@(("b"|"v"|"d"|"z"|"j"|"c"|"g"|"ğ"|"l"|"r"|"m"|"n"|"y"|"p"|"f"|"t"|"s"|"ş"|"ç"|"k"|"h")*) - + ("ı"|"a"|"i"|"e"|"u"|"o"|"ü"|"ö") + + ("a"|"e") +s2 => s1+h+s2 ; s => s - } - in base + suffix ; + } ; + suffix : Str = + case dp 1 base + take 1 suffix1 of { + ("ç"|"p"|"ş"|"k"|"f")+("d") => "t"+drop 1 suffix1 ; + _ => suffix1 + } ; + in base + buffer + suffix ; } -- cgit v1.2.3