mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-05-27 17:08:54 -06:00
added simple tenses
This commit is contained in:
@@ -15,8 +15,8 @@ concrete AdverbTur of Adverb = CatTur ** open ResTur, Prelude in {
|
|||||||
|
|
||||||
-- TODO: inflect the subject to genitive.
|
-- TODO: inflect the subject to genitive.
|
||||||
ComparAdvAdjS cadv a s = {
|
ComparAdvAdjS cadv a s = {
|
||||||
s = s.s ! SubordSuffixDik ++ cadv.s ++ a.s ! Sg ! Nom
|
s = s.subord ++ cadv.s ++ a.s ! Sg ! Nom
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
SubjS s1 s2 = {s = s1.s ++ s2.s ! SubordSuffixDik} ;
|
SubjS s1 s2 = {s = s1.s ++ s2.subord} ;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,10 +4,9 @@ concrete CatTur of Cat = CommonX - [CAdv,AdN] ** open ResTur, Prelude in {
|
|||||||
|
|
||||||
lincat
|
lincat
|
||||||
|
|
||||||
S = {s : Gerundification => Str} ;
|
S = {s, subord : Str} ;
|
||||||
|
|
||||||
-- TODO: parameterize by tense.
|
Cl = {s : Tense => Str; subord : Str} ;
|
||||||
Cl = {s : Gerundification => Str} ;
|
|
||||||
|
|
||||||
|
|
||||||
-- Noun
|
-- Noun
|
||||||
@@ -50,6 +49,6 @@ concrete CatTur of Cat = CommonX - [CAdv,AdN] ** open ResTur, Prelude in {
|
|||||||
|
|
||||||
linref
|
linref
|
||||||
V = \v -> v.s ! VInfinitive ;
|
V = \v -> v.s ! VInfinitive ;
|
||||||
V2 = v.s ! VInfinitive ++ v.c.s ;
|
V2 = \v -> v.s ! VInfinitive ++ v.c.s ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -271,14 +271,14 @@ resource ParadigmsTur = open
|
|||||||
lin V {
|
lin V {
|
||||||
s =
|
s =
|
||||||
table {
|
table {
|
||||||
|
VPres agr =>
|
||||||
|
addSuffix aoristBase aorHar (verbSuffixes ! agr) ;
|
||||||
VProg agr =>
|
VProg agr =>
|
||||||
addSuffix progBase progHar (verbSuffixes ! agr) ;
|
addSuffix progBase progHar (verbSuffixes ! agr) ;
|
||||||
VPast agr =>
|
VPast agr =>
|
||||||
addSuffix pastBase pastHar (verbSuffixes ! agr) ;
|
addSuffix pastBase pastHar (verbSuffixes ! agr) ;
|
||||||
VFuture agr =>
|
VFuture agr =>
|
||||||
addSuffix futureTable futHar (verbSuffixes ! agr) ;
|
addSuffix futureTable futHar (verbSuffixes ! agr) ;
|
||||||
VAorist agr =>
|
|
||||||
addSuffix aoristBase aorHar (verbSuffixes ! agr) ;
|
|
||||||
VImperative =>
|
VImperative =>
|
||||||
base ;
|
base ;
|
||||||
VInfinitive =>
|
VInfinitive =>
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ concrete PhraseTur of Phrase = CatTur ** open Prelude, ResTur in {
|
|||||||
UttVP vp = {s = vp.s ! VInfinitive} ;
|
UttVP vp = {s = vp.s ! VInfinitive} ;
|
||||||
UttAP ap = {s = ap.s ! Sg ! Nom} ;
|
UttAP ap = {s = ap.s ! Sg ! Nom} ;
|
||||||
UttCN n = {s = n.s ! Sg ! Nom} ;
|
UttCN n = {s = n.s ! Sg ! Nom} ;
|
||||||
UttS s = {s = s.s ! None} ;
|
UttS s = {s = s.s} ;
|
||||||
UttAdv adv = adv ;
|
UttAdv adv = adv ;
|
||||||
|
|
||||||
NoPConj = {s = []} ;
|
NoPConj = {s = []} ;
|
||||||
|
|||||||
@@ -31,19 +31,18 @@ resource ResTur = ParamX ** open Prelude, Predef, HarmonyTur in {
|
|||||||
|
|
||||||
param
|
param
|
||||||
VForm =
|
VForm =
|
||||||
VProg Agr
|
VPres Agr
|
||||||
|
| VProg Agr
|
||||||
| VPast Agr
|
| VPast Agr
|
||||||
| VFuture Agr
|
| VFuture Agr
|
||||||
| VAorist Agr
|
|
||||||
| VImperative
|
| VImperative
|
||||||
| VInfinitive
|
| VInfinitive
|
||||||
| Gerund Number Case
|
| Gerund Number Case
|
||||||
| VNoun Number Case
|
| VNoun Number Case
|
||||||
;
|
;
|
||||||
|
|
||||||
param Gerundification = None | SubordSuffixDik ;
|
param
|
||||||
|
ConjType = Infix | Mixfix ;
|
||||||
param ConjType = Infix | Mixfix ;
|
|
||||||
|
|
||||||
UseGen = NoGen | YesGen Agr | UseIndef ;
|
UseGen = NoGen | YesGen Agr | UseIndef ;
|
||||||
|
|
||||||
@@ -74,7 +73,7 @@ resource ResTur = ParamX ** open Prelude, Predef, HarmonyTur in {
|
|||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- Prep
|
-- Prep
|
||||||
noPrep = mkPrep [] Acc;
|
noPrep = mkPrep [] Nom;
|
||||||
|
|
||||||
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};
|
||||||
@@ -82,12 +81,15 @@ resource ResTur = ParamX ** open Prelude, Predef, HarmonyTur in {
|
|||||||
mkNP : Noun -> Number -> Person -> {s : Case => Str; a : Agr} =
|
mkNP : Noun -> Number -> Person -> {s : Case => Str; a : Agr} =
|
||||||
\noun, n, p -> {s = noun.s ! n; a = {n = n; p = p}} ;
|
\noun, n, p -> {s = noun.s ! n; a = {n = n; p = p}} ;
|
||||||
|
|
||||||
mkClause : Str -> Agr -> Verb -> {s : Gerundification => Str} =
|
mkClause : Str -> Agr -> Verb -> {s : Tense => Str; subord : Str} =
|
||||||
\np, a, v -> {
|
\np, a, v -> {
|
||||||
s = table {
|
s = table {
|
||||||
None => np ++ v.s ! VProg a ;
|
Pres => np ++ v.s ! VPres a ;
|
||||||
SubordSuffixDik => np ++ v.s ! VNoun a.n Nom
|
Past => np ++ v.s ! VPast a ;
|
||||||
}
|
Fut => np ++ v.s ! VFuture a ;
|
||||||
|
Cond => "TODO"
|
||||||
|
} ;
|
||||||
|
subord = np ++ v.s ! VNoun a.n Nom
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
mkDet : Str -> Number -> UseGen -> {s : Str; n : Number; useGen : UseGen} =
|
mkDet : Str -> Number -> UseGen -> {s : Str; n : Number; useGen : UseGen} =
|
||||||
|
|||||||
@@ -8,6 +8,6 @@ concrete SentenceTur of Sentence = CatTur ** open Prelude, ResTur in {
|
|||||||
EmbedVP vp = {s = (vp.s ! Gerund Sg Acc)} ;
|
EmbedVP vp = {s = (vp.s ! Gerund Sg Acc)} ;
|
||||||
|
|
||||||
-- TODO: rudimentary implementation; revise this.
|
-- TODO: rudimentary implementation; revise this.
|
||||||
UseCl temp pol cl = {s = cl.s} ;
|
UseCl temp pol cl = {s = temp.s ++ cl.s ! temp.t; subord=cl.subord} ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ concrete VerbTur of Verb = CatTur ** open ResTur in {
|
|||||||
|
|
||||||
-- TODO: test this and fix.
|
-- TODO: test this and fix.
|
||||||
ComplVS vs s = {
|
ComplVS vs s = {
|
||||||
s = \\vf => s.s ! SubordSuffixDik ++ vs.s ! vf
|
s = \\vf => s.subord ++ vs.s ! vf
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user