1
0
forked from GitHub/gf-rgl

Transfer updates to CatTur.gf and ResTur.gf

This commit is contained in:
Ayberk Tosun
2018-08-21 18:05:49 +03:00
parent 966716cc7d
commit 191fab7472
2 changed files with 35 additions and 3 deletions

View File

@@ -11,6 +11,7 @@ concrete CatTur of Cat = CommonX ** open ResTur, Prelude in {
NP = {s : Case => Str ; a : Agr} ; NP = {s : Case => Str ; a : Agr} ;
VP = Verb ; VP = Verb ;
VPSlash = VP ** {c : Prep} ; VPSlash = VP ** {c : Prep} ;
Conj = {s : Str ; s1 : Str ; s2 : Str ; ct : ConjType} ;
Pron = ResTur.Pron ; Pron = ResTur.Pron ;
Det = {s : Str; n : Number; useGen : UseGen} ; Det = {s : Str; n : Number; useGen : UseGen} ;

View File

@@ -23,10 +23,11 @@ resource ResTur = ParamX ** open Prelude, Predef, HarmonyTur in {
agrP3 : Number -> Agr ; agrP3 : Number -> Agr ;
agrP3 n = {n = n; p = P3} ; agrP3 n = {n = n; p = P3} ;
-- For $Adjective$ -- For $Adjective$
oper oper
Adjective = Noun ** { adv : Str } ; Adjective = Noun ** { adv : Str } ;
-- For $Verb$.
-- For $Verb$.
param param
VForm = VForm =
@@ -39,6 +40,8 @@ resource ResTur = ParamX ** open Prelude, Predef, HarmonyTur in {
| Gerund Number Case | Gerund Number Case
; ;
param ConjType = Infix | Mixfix ;
UseGen = NoGen | YesGen Agr | UseIndef ; UseGen = NoGen | YesGen Agr | UseIndef ;
oper oper
@@ -73,9 +76,37 @@ resource ResTur = ParamX ** open Prelude, Predef, HarmonyTur in {
mkPrep : Str -> Case -> {s : Str; c : Case; lock_Prep : {}} = mkPrep : Str -> Case -> {s : Str; c : Case; lock_Prep : {}} =
\s, c -> lin Prep {s=s; c=c}; \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} = mkClause : Str -> Agr -> Verb -> {s : Str} =
\np, a, v -> ss (np ++ v.s ! VProg a) ; \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} = attachMe : Verb -> {s : Str} =
\v -> \v ->
let let