From 191fab7472dca74dd7a07139c71c11dfbe596397 Mon Sep 17 00:00:00 2001 From: Ayberk Tosun Date: Tue, 21 Aug 2018 18:05:49 +0300 Subject: [PATCH] Transfer updates to CatTur.gf and ResTur.gf --- src/turkish/CatTur.gf | 1 + src/turkish/ResTur.gf | 37 ++++++++++++++++++++++++++++++++++--- 2 files changed, 35 insertions(+), 3 deletions(-) diff --git a/src/turkish/CatTur.gf b/src/turkish/CatTur.gf index 62dffafea..b56c8172e 100644 --- a/src/turkish/CatTur.gf +++ b/src/turkish/CatTur.gf @@ -11,6 +11,7 @@ concrete CatTur of Cat = CommonX ** open ResTur, Prelude in { NP = {s : Case => Str ; a : Agr} ; VP = Verb ; VPSlash = VP ** {c : Prep} ; + Conj = {s : Str ; s1 : Str ; s2 : Str ; ct : ConjType} ; Pron = ResTur.Pron ; Det = {s : Str; n : Number; useGen : UseGen} ; diff --git a/src/turkish/ResTur.gf b/src/turkish/ResTur.gf index 89456ae42..8e483cd38 100644 --- a/src/turkish/ResTur.gf +++ b/src/turkish/ResTur.gf @@ -23,13 +23,14 @@ resource ResTur = ParamX ** open Prelude, Predef, HarmonyTur in { agrP3 : Number -> Agr ; agrP3 n = {n = n; p = P3} ; --- For $Adjective$ + -- For $Adjective$ oper Adjective = Noun ** { adv : Str } ; --- For $Verb$. + + -- For $Verb$. param - VForm = + VForm = VProg Agr | VPast Agr | VFuture Agr @@ -39,6 +40,8 @@ resource ResTur = ParamX ** open Prelude, Predef, HarmonyTur in { | Gerund Number Case ; + param ConjType = Infix | Mixfix ; + UseGen = NoGen | YesGen Agr | UseIndef ; oper @@ -73,9 +76,37 @@ resource ResTur = ParamX ** open Prelude, Predef, HarmonyTur in { mkPrep : Str -> Case -> {s : Str; c : Case; lock_Prep : {}} = \s, c -> lin Prep {s=s; c=c}; + mkNP : Noun -> Number -> Person -> {s : Case => Str; a : Agr} = + \noun, n, p -> {s = noun.s ! n; a = {n = n; p = p}} ; + mkClause : Str -> Agr -> Verb -> {s : Str} = \np, a, v -> ss (np ++ v.s ! VProg a) ; + mkDet : Str -> Number -> UseGen -> {s : Str; n : Number; useGen : UseGen} = + \s, n, ug -> {s = s; n = n; useGen = ug} ; + + mkConj : overload { + mkConj : Str -> {s : Str ; s1 : Str ; s2 : Str ; ct : ConjType} ; + mkConj : Str -> Str -> {s : Str ; s1 : Str ; s2 : Str ; ct : ConjType} ; + } ; + + mkConj = overload { + mkConj : Str -> {s : Str ; s1 : Str ; s2 : Str ; ct : ConjType} = + \s -> { + s = s ; + s1 = s ; + s2 = [] ; + ct = Infix + } ; + mkConj : Str -> Str -> {s : Str ; s1 : Str ; s2 : Str ; ct : ConjType} = + \s1, s2 -> { + s = s1 ++ s2 ; + s1 = s1 ; + s2 = s2 ; + ct = Mixfix + } ; + } ; + attachMe : Verb -> {s : Str} = \v -> let