forked from GitHub/gf-rgl
started relative clauses
This commit is contained in:
@@ -4,8 +4,11 @@ concrete CatTur of Cat = CommonX - [CAdv,AdN] ** open ResTur, HarmonyTur, Prelud
|
||||
|
||||
lincat
|
||||
|
||||
-- Tensed/Untensed
|
||||
S = {s : Str} ;
|
||||
RS = {s : Agr => Str} ;
|
||||
|
||||
-- Sentence
|
||||
Cl = {s : Tense => Polarity => Str} ;
|
||||
Imp = {s : Polarity => Number => Str} ;
|
||||
|
||||
@@ -13,6 +16,11 @@ concrete CatTur of Cat = CommonX - [CAdv,AdN] ** open ResTur, HarmonyTur, Prelud
|
||||
CN = {s : Number => Case => Str; gen : Number => Agr => Str; h : Harmony} ;
|
||||
NP = {s : Case => Str ; h : Harmony; a : Agr} ;
|
||||
|
||||
-- Relative
|
||||
RCl = {s : Tense => Polarity => Agr => Str} ;
|
||||
RP = {s : Agr => Str} ;
|
||||
|
||||
-- Verb
|
||||
VP = {s : Aspect => VForm => Str; compl : Str} ;
|
||||
VPSlash = Verb ** {compl : Str; c : Prep} ;
|
||||
Comp = {s : Aspect => VForm => Str; compl : Str} ;
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
concrete ExtendTur of Extend = CatTur ** open ResTur, SuffixTur, Predef in {
|
||||
|
||||
lin
|
||||
GenRP n cn = {
|
||||
s = cn.gen ! n.n
|
||||
} ;
|
||||
|
||||
GenModNP num np cn = {
|
||||
s = \\c => np.s ! Nom ++ num.s ! num.n ! c ++ cn.gen ! num.n ! np.a ;
|
||||
h = cn.h ;
|
||||
|
||||
@@ -231,19 +231,16 @@ concrete NounTur of Noun = CatTur ** open ResTur, SuffixTur, HarmonyTur, ParamX,
|
||||
h = cn.h
|
||||
} ;
|
||||
|
||||
-- TODO: currently not able to generate trees.
|
||||
RelCN cn rs = {
|
||||
s = \\n,c => "(TODO: RelCN)" ;
|
||||
gen = cn.gen ;
|
||||
s = \\n,c => rs.s ! {n=n; p=P3} ++ cn.s ! n ! c ;
|
||||
gen = \\n,c => rs.s ! {n=n; p=P3} ++ cn.gen ! n ! c ;
|
||||
h = cn.h
|
||||
} ;
|
||||
|
||||
RelNP np rs = {
|
||||
s = \\c => "(TODO: RelNP)" ;
|
||||
gen = np.gen ;
|
||||
s = \\c => rs.s ! np.a ++ np.s ! c ;
|
||||
h = np.h ;
|
||||
a = np.a ;
|
||||
c = np.c
|
||||
a = np.a
|
||||
} ;
|
||||
|
||||
}
|
||||
|
||||
@@ -2,10 +2,19 @@ concrete RelativeTur of Relative = CatTur ** open ResTur in {
|
||||
|
||||
lin
|
||||
RelCl = variants {} ;
|
||||
RelVP = variants {} ;
|
||||
|
||||
RelVP rp vp = {
|
||||
s = \\t,p,agr => rp.s ! agr ++ vp.compl ++
|
||||
case t of {
|
||||
Fut => vp.s ! Perf ! VProspPart p ;
|
||||
_ => vp.s ! Perf ! VImperfPart p
|
||||
}
|
||||
} ;
|
||||
|
||||
RelSlash = variants {} ;
|
||||
|
||||
FunRP = variants {} ;
|
||||
IdRP = variants {} ;
|
||||
|
||||
IdRP = {s = \\_ => []} ;
|
||||
|
||||
}
|
||||
|
||||
@@ -41,6 +41,9 @@ resource ResTur = ParamX ** open Prelude, Predef, HarmonyTur, SuffixTur in {
|
||||
|
||||
VForm =
|
||||
VInf Polarity
|
||||
| VImperfPart Polarity
|
||||
| VPerfPart Polarity
|
||||
| VProspPart Polarity
|
||||
| VImp Polarity Number
|
||||
| VFin Tense Polarity Agr
|
||||
;
|
||||
@@ -126,6 +129,21 @@ resource ResTur = ParamX ** open Prelude, Predef, HarmonyTur, SuffixTur in {
|
||||
Imperf => suffixStr negHar progrSuffix +
|
||||
suffixStr progrHar infinitiveSuffix
|
||||
} ;
|
||||
VImperfPart Pos => v.stems ! VFuture ++ BIND ++
|
||||
suffixStr v.h imperfParticipleSuffix ;
|
||||
VImperfPart Neg => v.stems ! VBase Hard ++ BIND ++
|
||||
suffixStr v.h negativeSuffix +
|
||||
suffixStr negHar imperfParticipleSuffix ;
|
||||
VPerfPart Pos => v.stems ! VBase Hard ++ BIND ++
|
||||
suffixStr v.h perfParticipleSuffix ;
|
||||
VPerfPart Neg => v.stems ! VBase Hard ++ BIND ++
|
||||
suffixStr v.h negativeSuffix +
|
||||
suffixStr negHar perfParticipleSuffix ;
|
||||
VProspPart Pos => v.stems ! VFuture ++ BIND ++
|
||||
suffixStr v.h prospParticipleSuffix ;
|
||||
VProspPart Neg => v.stems ! VBase Hard ++ BIND ++
|
||||
suffixStr v.h negativeSuffix +
|
||||
suffixStr negHar prospParticipleSuffix ;
|
||||
VImp p n => case asp of {
|
||||
Perf => v.stems ! VBase Soft ++
|
||||
case <p,n> of {
|
||||
|
||||
@@ -12,7 +12,7 @@ concrete SentenceTur of Sentence = CatTur ** open Prelude, ResTur in {
|
||||
|
||||
UseQCl _ _ = variants {} ;
|
||||
|
||||
UseRCl _ _ _ = variants {} ;
|
||||
UseRCl temp pol cl = {s = \\agr => temp.s ++ pol.s ++ cl.s ! temp.t ! pol.p ! agr} ;
|
||||
|
||||
SlashVP _ _ = variants {} ;
|
||||
AdvSlash _ _ = variants {} ;
|
||||
|
||||
@@ -123,6 +123,10 @@ resource SuffixTur = open Prelude, Predef, HarmonyTur in {
|
||||
passiveInSuffix : Suffix = regSuffix "in" "n" ;
|
||||
passiveIlSuffix : Suffix = regSuffix "il" "l" ;
|
||||
|
||||
imperfParticipleSuffix : Suffix = regSuffix "en" "yen" ;
|
||||
perfParticipleSuffix : Suffix = regSuffix "miş" "miş" ;
|
||||
prospParticipleSuffix : Suffix = regSuffix "ecek" "yecek" ;
|
||||
|
||||
-- Ordinal suffix for numbers
|
||||
ordNumSuffix : Suffix = regSuffix21 "inci" "nci" ;
|
||||
-- Suffix for deriving adverb from a adjective
|
||||
|
||||
@@ -62,8 +62,6 @@ concrete VerbTur of Verb = CatTur ** open Prelude, ResTur, SuffixTur, HarmonyTur
|
||||
CompAP ap = {
|
||||
s = \\asp,vform =>
|
||||
case <asp,vform> of {
|
||||
<_,VInf p> => ap.s ! Sg ! Nom ++
|
||||
mkVerbForms olmak_V ! asp ! (VInf p) ;
|
||||
<_,VImp p n> => ap.s ! n ! Nom ++
|
||||
mkVerbForms olmak_V ! asp ! (VImp p n) ;
|
||||
<Perf,VFin Pres p agr> =>
|
||||
@@ -90,7 +88,9 @@ concrete VerbTur of Verb = CatTur ** open Prelude, ResTur, SuffixTur, HarmonyTur
|
||||
suffixStr ap.h (alethicCopulaSuffixes ! agr) ;
|
||||
<_,VFin t p agr> =>
|
||||
ap.s ! agr.n ! Nom ++
|
||||
mkVerbForms olmak_V ! asp ! (VFin t p agr)
|
||||
mkVerbForms olmak_V ! asp ! (VFin t p agr) ;
|
||||
_ => ap.s ! Sg ! Nom ++
|
||||
mkVerbForms olmak_V ! asp ! vform
|
||||
} ;
|
||||
compl = []
|
||||
} ;
|
||||
|
||||
Reference in New Issue
Block a user