mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-06-30 02:58:35 -06:00
(Est) Automatic whitespace removal
in its own commit,rather than have whitespace changes in content commits
This commit is contained in:
+30
-30
@@ -7,15 +7,15 @@ concrete NounEst of Noun = CatEst ** open ResEst, HjkEst, MorphoEst, Prelude in
|
||||
-- The $Number$ is subtle: "nuo autot", "nuo kolme autoa" are both plural
|
||||
-- for verb agreement, but the noun form is singular in the latter.
|
||||
|
||||
DetCN det cn =
|
||||
DetCN det cn =
|
||||
let
|
||||
n : Number = case det.isNum of {
|
||||
True => Sg ;
|
||||
_ => det.n
|
||||
} ;
|
||||
ncase : NPForm -> Case * NForm = \c ->
|
||||
let k = npform2case n c
|
||||
in
|
||||
let k = npform2case n c
|
||||
in
|
||||
case <n, c, det.isNum, det.isDef> of {
|
||||
<_, NPAcc, True,_> => <Nom,NCase Sg Part> ; -- kolm kassi (as object)
|
||||
<_, NPCase Nom, True,_> => <Nom,NCase Sg Part> ; -- kolm kassi (as subject)
|
||||
@@ -25,12 +25,12 @@ concrete NounEst of Noun = CatEst ** open ResEst, HjkEst, MorphoEst, Prelude in
|
||||
<_, NPCase Abess, _, _> => <Gen,NCase n Abess> ; -- kolme kassita
|
||||
<_, NPCase Ess, _, _> => <Gen,NCase n Ess> ; -- kolme kassina
|
||||
<_, NPCase Termin,_, _> => <Gen,NCase n Termin> ; -- kolme kassini
|
||||
|
||||
|
||||
<_, _, True,_> => <k, NCase Sg k> ; -- kolmeks kassiks (all other cases)
|
||||
_ => <k, NCase n k> -- kass, kassi, ... (det is not a number)
|
||||
}
|
||||
in {
|
||||
s = \\c => let
|
||||
s = \\c => let
|
||||
k = ncase c ;
|
||||
in
|
||||
det.s ! k.p1 ++ cn.s ! k.p2 ;
|
||||
@@ -42,7 +42,7 @@ concrete NounEst of Noun = CatEst ** open ResEst, HjkEst, MorphoEst, Prelude in
|
||||
isPron = False
|
||||
} ;
|
||||
|
||||
DetNP det =
|
||||
DetNP det =
|
||||
let
|
||||
n : Number = case det.isNum of {
|
||||
True => Sg ;
|
||||
@@ -50,7 +50,7 @@ concrete NounEst of Noun = CatEst ** open ResEst, HjkEst, MorphoEst, Prelude in
|
||||
} ;
|
||||
in {
|
||||
s = \\c => let k = npform2case n c in
|
||||
det.sp ! k ;
|
||||
det.sp ! k ;
|
||||
a = agrP3 (case det.isDef of {
|
||||
False => Sg ; -- autoja menee; kolme autoa menee
|
||||
_ => det.n
|
||||
@@ -59,7 +59,7 @@ concrete NounEst of Noun = CatEst ** open ResEst, HjkEst, MorphoEst, Prelude in
|
||||
} ;
|
||||
|
||||
UsePN pn = {
|
||||
s = \\c => pn.s ! npform2case Sg c ;
|
||||
s = \\c => pn.s ! npform2case Sg c ;
|
||||
a = agrP3 Sg ;
|
||||
isPron = False
|
||||
} ;
|
||||
@@ -72,10 +72,10 @@ concrete NounEst of Noun = CatEst ** open ResEst, HjkEst, MorphoEst, Prelude in
|
||||
} ;
|
||||
|
||||
PPartNP np v2 =
|
||||
let
|
||||
let
|
||||
num : Number = complNumAgr np.a ;
|
||||
part : Str = v2.s ! (PastPart Pass) ;
|
||||
adj : NForms = hjk_type_IVb_maakas part ;
|
||||
adj : NForms = hjk_type_IVb_maakas part ;
|
||||
partGen : Str = adj ! 1 ;
|
||||
partEss : Str = partGen + "na"
|
||||
in {
|
||||
@@ -91,8 +91,8 @@ concrete NounEst of Noun = CatEst ** open ResEst, HjkEst, MorphoEst, Prelude in
|
||||
} ;
|
||||
|
||||
DetQuantOrd quant num ord = {
|
||||
s = \\c => quant.s ! num.n ! c ++ num.s ! Sg ! c ++ ord.s ! NCase num.n c ;
|
||||
sp = \\c => quant.sp ! num.n ! c ++ num.s ! Sg ! c ++ ord.s ! NCase num.n c ;
|
||||
s = \\c => quant.s ! num.n ! c ++ num.s ! Sg ! c ++ ord.s ! NCase num.n c ;
|
||||
sp = \\c => quant.sp ! num.n ! c ++ num.s ! Sg ! c ++ ord.s ! NCase num.n c ;
|
||||
n = num.n ;
|
||||
isNum = num.isNum ;
|
||||
isDef = quant.isDef
|
||||
@@ -135,19 +135,19 @@ concrete NounEst of Noun = CatEst ** open ResEst, HjkEst, MorphoEst, Prelude in
|
||||
NumCard n = n ** {isNum = case n.n of {Sg => False ; _ => True}} ; -- üks raamat/kaks raamatut
|
||||
|
||||
NumDigits numeral = {
|
||||
s = \\n,c => numeral.s ! NCard (NCase n c) ;
|
||||
n = numeral.n
|
||||
s = \\n,c => numeral.s ! NCard (NCase n c) ;
|
||||
n = numeral.n
|
||||
} ;
|
||||
OrdDigits numeral = {s = \\nc => numeral.s ! NOrd nc} ;
|
||||
|
||||
NumNumeral numeral = {
|
||||
s = \\n,c => numeral.s ! NCard (NCase n c) ;
|
||||
s = \\n,c => numeral.s ! NCard (NCase n c) ;
|
||||
n = numeral.n
|
||||
} ;
|
||||
OrdNumeral numeral = {s = \\nc => numeral.s ! NOrd nc} ;
|
||||
|
||||
AdNum adn num = {
|
||||
s = \\n,c => adn.s ++ num.s ! n ! c ;
|
||||
s = \\n,c => adn.s ++ num.s ! n ! c ;
|
||||
n = num.n
|
||||
} ;
|
||||
|
||||
@@ -156,17 +156,17 @@ concrete NounEst of Noun = CatEst ** open ResEst, HjkEst, MorphoEst, Prelude in
|
||||
OrdSuperl a = {s = \\nc => "kõige" ++ a.s ! Compar ! AN nc} ;
|
||||
|
||||
DefArt = {
|
||||
s = \\_,_ => [] ;
|
||||
sp = table {Sg => pronSe.s ; Pl => pronNe.s} ;
|
||||
s = \\_,_ => [] ;
|
||||
sp = table {Sg => pronSe.s ; Pl => pronNe.s} ;
|
||||
isNum = False ;
|
||||
isDef = True -- autot ovat
|
||||
} ;
|
||||
|
||||
IndefArt = {
|
||||
s = \\_,_ => [] ; --use isDef in DetCN
|
||||
sp = \\n,c =>
|
||||
(nForms2N (nForms6 "üks" "ühe" "üht" "ühesse" "ühtede"
|
||||
"ühtesid")).s ! NCase n c ;
|
||||
sp = \\n,c =>
|
||||
(nForms2N (nForms6 "üks" "ühe" "üht" "ühesse" "ühtede"
|
||||
"ühtesid")).s ! NCase n c ;
|
||||
isNum,isDef = False -- autoja on
|
||||
} ;
|
||||
|
||||
@@ -176,7 +176,7 @@ concrete NounEst of Noun = CatEst ** open ResEst, HjkEst, MorphoEst, Prelude in
|
||||
ncase : Case -> NForm = \c -> NCase n c ;
|
||||
in {
|
||||
s = \\c => let k = npform2case n c in
|
||||
cn.s ! ncase k ;
|
||||
cn.s ! ncase k ;
|
||||
a = agrP3 Sg ;
|
||||
isPron = False
|
||||
} ;
|
||||
@@ -209,21 +209,21 @@ concrete NounEst of Noun = CatEst ** open ResEst, HjkEst, MorphoEst, Prelude in
|
||||
|
||||
|
||||
AdjCN ap cn = {
|
||||
s = \\nf =>
|
||||
s = \\nf =>
|
||||
case ap.infl of {
|
||||
(Invariable|Participle) => ap.s ! True ! (NCase Sg Nom) ++ cn.s ! nf ; --valmis kassile; väsinud kassile
|
||||
Regular => case nf of {
|
||||
NCase num (Ess|Abess|Comit|Termin) => ap.s ! True ! (NCase num Gen) ++ cn.s ! nf ; --suure kassiga, not *suurega kassiga
|
||||
Invariable|Participle => ap.s ! True ! NCase Sg Nom ++ cn.s ! nf ; --valmis kassile; väsinud kassile
|
||||
Regular => case nf of {
|
||||
NCase num (Ess|Abess|Comit|Termin) => ap.s ! True ! NCase num Gen ++ cn.s ! nf ; --suure kassiga, not *suurega kassiga
|
||||
_ => ap.s ! True ! nf ++ cn.s ! nf
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} ;
|
||||
|
||||
RelCN cn rs = {s = \\nf => cn.s ! nf ++ rs.s ! agrP3 (numN nf)} ;
|
||||
|
||||
RelNP np rs = {
|
||||
s = \\c => np.s ! c ++ "," ++ rs.s ! np.a ;
|
||||
a = np.a ;
|
||||
s = \\c => np.s ! c ++ "," ++ rs.s ! np.a ;
|
||||
a = np.a ;
|
||||
isPron = np.isPron ---- correct ?
|
||||
} ;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user