(Kor) Add SymbolKor functions and MassNP

This commit is contained in:
Inari Listenmaa
2020-04-03 16:04:52 +02:00
parent a9ec29a1e6
commit 85b905f0e0
2 changed files with 16 additions and 13 deletions

View File

@@ -63,9 +63,9 @@ concrete NounKor of Noun = CatKor ** open ResKor, Prelude in {
} ; } ;
-- MassNP : CN -> NP ; -- MassNP : CN -> NP ;
-- MassNP cn = useN cn ** { MassNP cn = cn ** {
-- } ; s = \\nf => cn.rs ++ cn.s ! nf
} ;
--2 Determiners --2 Determiners

View File

@@ -1,7 +1,7 @@
--# -path=.:../abstract:../common:../prelude --# -path=.:../abstract:../common:../prelude
concrete SymbolKor of Symbol = CatKor ** concrete SymbolKor of Symbol = CatKor **
open Prelude, ResKor in { open Prelude, ResKor, (NK=NounKor) in {
lin lin
@@ -24,26 +24,29 @@ oper
p = Consonant ; -- ?? p = Consonant ; -- ??
} ; } ;
{-
lin lin
-- CNIntNP cn i = {} ; -- : CN -> Int -> NP
CNIntNP cn i = NK.MassNP (cn ** {
s = \\nf => cn.s ! nf ++ i.s}) ;
-- : Det -> CN -> [Symb] -> NP ; -- (the) (2) numbers x and y -- : Det -> CN -> [Symb] -> NP ; -- (the) (2) numbers x and y
CNSymbNP det cn xs = CNSymbNP det cn xs =
let cnSymb = cn ** { comp = cn.comp ++ xs.s } let cnSymb : CN = cn ** {s = \\nf => cn.s ! nf ++ xs.s}
in NS.DetCN det cnSymb ; in NK.DetCN det cnSymb ;
-- : CN -> Card -> NP ; -- level five ; level 5 -- : CN -> Card -> NP ; -- level five ; level 5
CNNumNP cn i = NS.MassNP (cn ** { comp = cn.comp ++ i.s }) ; CNNumNP cn i = NK.MassNP (cn ** {
s = \\nf => cn.s ! nf ++ i.s ! cn.c.origin ! Indep}) ;
-- : Symb -> S ; -- : Symb -> S ;
SymbS sy = {s = } ; SymbS sy = {s = \\_ => sy.s} ;
-- : Symb -> Card ; -- : Symb -> Card ;
SymbNum sy = { s = sy.s ; n = Pl } ; SymbNum sy = baseNum ** {s = \\_,_ => sy.s} ;
-- : Symb -> Ord ; -- : Symb -> Ord ;
SymbOrd sy = { s =} ; SymbOrd sy = sy ** {n=Pl} ;
-}
lincat lincat
Symb, [Symb] = SS ; Symb, [Symb] = SS ;