1
0
forked from GitHub/gf-rgl

added simple tenses

This commit is contained in:
krangelov
2019-09-03 21:37:14 +02:00
parent 026ecba0e7
commit b53ac90c3c
7 changed files with 22 additions and 21 deletions

View File

@@ -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} ;
} }

View File

@@ -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 ;
} }

View File

@@ -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 =>

View File

@@ -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 = []} ;

View File

@@ -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} =

View File

@@ -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} ;
} }

View File

@@ -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
} ; } ;
} }