working tests for verbal affixes and tenses, add kepada (to a person), initial groundwork for animacy, numerals

This commit is contained in:
Meowyam
2022-03-21 17:28:45 +08:00
parent 88ae0d5093
commit 9fa07fb22d
13 changed files with 96 additions and 21 deletions
+24 -11
View File
@@ -51,7 +51,7 @@ concrete NounMay of Noun = CatMay ** open ResMay, Prelude in {
-- : Det -> NP ;
DetNP det = emptyNP ** {
s = \\_ => det.s ;
s = \\_ => linDet det ;
} ;
-- MassNP : CN -> NP ;
@@ -71,10 +71,12 @@ concrete NounMay of Noun = CatMay ** open ResMay, Prelude in {
n = num.n
} ;
-- : Quant -> Num -> Ord -> Det ; -- these five best
-- DetQuantOrd quant num ord =
-- let theseFive = DetQuant quant num in theseFive ** {
-- } ;
-- : Quant -> Num -> Ord -> Det ;
DetQuantOrd quant num ord = quant ** {
pr = num.s ;
n = num.n ;
s = ord.s ++ quant.s ;
} ;
-- Whether the resulting determiner is singular or plural depends on the
-- cardinal.
@@ -107,18 +109,21 @@ concrete NounMay of Noun = CatMay ** open ResMay, Prelude in {
OrdDigits digs = digs ** { s = digs.s ! NOrd } ;
-}
-- : Numeral -> Ord ;
-- OrdNumeral num = num ** {
-- s = \\_ => num.ord
-- } ;
OrdNumeral num = {
s = num.ord
} ;
-- : A -> Ord ;
-- OrdSuperl a = {
-- } ;
OrdSuperl a = {
s = "ter" ++ BIND ++ a.s
} ;
-- One can combine a numeral and a superlative.
-- : Numeral -> A -> Ord ; -- third largest
-- OrdNumeralSuperl num a = num ** { } ;
OrdNumeralSuperl num a = {
s = num.ord ++ "ter" ++ BIND ++ a.s
} ;
-- : Quant
DefArt = mkQuant [] ;
@@ -199,6 +204,14 @@ concrete NounMay of Noun = CatMay ** open ResMay, Prelude in {
}
} ;
-- : Det -> NP -> NP ;
CountNP det np = np **
{
s = \\pos => "ke" ++ BIND ++ linDet det ++ BIND ++ "-" ++ BIND ++ linDet det ++ np.s ! pos;
} ; -- Nonsense for DefArt or IndefArt
-- : CN -> NP -> CN ; -- glass of wine / two kilos of red apples
-- PartNP cn np = cn ** {
-- } ;