1
0
forked from GitHub/gf-rgl

(Kor) Add ConjS + new form in S and Cl inflection table

This commit is contained in:
Inari Listenmaa
2020-03-27 11:42:05 +01:00
parent ec0173c587
commit 8a151c684a
5 changed files with 33 additions and 17 deletions

View File

@@ -48,17 +48,29 @@ lin
BaseRS = twoTable3 … ;
ConsRS = consrTable3 … comma ;
ConjRS = conjunctRSTable ;
-}
lincat
[S] = {} ;
[S] = ResKor.Sentence ** {firstS : ConjType => Str} ;
lin
BaseS x y = y ** { } ;
ConsS x xs =
xs ** { } ;
ConjS co xs = {} ;
-}
BaseS s1 s2 = s2 ** {
firstS = mkFirstS s1
} ;
ConsS s ss = ss ** {
firstS = \\conj =>
mkFirstS s ! conj ++ ss.firstS ! conj ;
} ;
ConjS co ss = ss ** {
s = \\st => co.s1 ++ ss.firstS ! co.c ++ ss.s ! st
} ;
oper
mkFirstS : ResKor.Sentence -> ConjType => Str = \s ->
\\conj => glue (s.s ! Subord) (conjTable ! NStar ! conj) ;
lincat
[AP] = ResKor.AdjPhrase ** {firstAP : AForm => ConjType => Str} ;

Binary file not shown.

View File

@@ -3,7 +3,7 @@ concrete PhraseKor of Phrase = CatKor ** open Prelude, ResKor in {
lin
PhrUtt pconj utt voc = {s = pconj.s ++ utt.s ++ voc.s} ;
UttS s = s ;
UttS s = {s = s.s ! Statement} ;
UttQS qs = qs ;
UttIAdv iadv = iadv ;
{-

View File

@@ -294,7 +294,7 @@ oper
--------------------------------------------------------------------------------
-- Cl, S
Clause : Type = {s : Tense => Anteriority => Polarity => Str} ;
Clause : Type = {s : Tense => Anteriority => Polarity => ClType => Str} ;
{- After PredVP, we might still want to add more adverbs (QuestIAdv),
but we're done with verb inflection.
@@ -305,13 +305,17 @@ oper
RClause : Type = {s : NForm => Tense => Anteriority => Polarity => Str} ;
Sentence : Type = {s : Str} ;
Sentence : Type = {s : ClType => Str} ;
predVP : NounPhrase -> VerbPhrase -> ClSlash = \np,vp -> vp ** {
s = \\t,a,p => np.s ! vp.sc
++ vp.nObj -- an object, not copula complement
++ vp.adv
++ vp.s ! VF Polite p -- TODO: more tenses, choose politeness
s = \\t,a,p,cltyp =>
let vf = case cltyp of {
Subord => VStem ;
_ => VF Polite p } -- TODO: more tenses, politeness
in np.s ! vp.sc
++ vp.nObj -- an object, not copula complement
++ vp.adv
++ vp.s ! vf
} ;
--------------------------------------------------------------------------------

View File

@@ -49,11 +49,11 @@ lin
-- : Temp -> Pol -> Cl -> S ;
UseCl t p cl = {
s = t.s ++ p.s ++ cl.s ! t.t ! t.a ! p.p
s = \\c => t.s ++ p.s ++ cl.s ! t.t ! t.a ! p.p ! c
} ;
-- : Temp -> Pol -> QCl -> QS ;
UseQCl t p cl = {s = t.s ++ p.s ++ cl.s ! t.t ! t.a ! p.p} ;
UseQCl t p cl = {s = t.s ++ p.s ++ cl.s ! t.t ! t.a ! p.p ! Statement} ;
-- : Temp -> Pol -> RCl -> RS ;
-- UseRCl t p cl = {s = } ;
@@ -73,7 +73,7 @@ lin
oper
advS : (comma : Str) -> Adverb -> S -> S = \comma,a,sent -> sent ** {
s = a.s ++ comma ++ sent.s
s = \\c => a.s ++ comma ++ sent.s ! c
} ;
}