wip: noun morphology

This commit is contained in:
2026-02-12 18:46:56 -07:00
parent 16fb8b3645
commit 54c02b4be4
2 changed files with 20 additions and 7 deletions

View File

@@ -11,11 +11,11 @@ concrete MicroLangKor of MicroLang = open MicroResKor, Prelude in {
Utt = {s : Str} ;
S = {s : Str} ;
VP = {verb : Verb ; compl : Str} ; ---s special case of Mini
VP = {verb : Verb ; compl : N} ; ---s special case of Mini
Comp = Noun ;
AP = Adjective ;
CN = Noun ;
NP = {s : Str} ;
NP = Noun ;
Pron = {s : Str} ;
Det = {s : Str} ;
Prep = {s : Str} ;
@@ -27,9 +27,9 @@ concrete MicroLangKor of MicroLang = open MicroResKor, Prelude in {
lin
UttS s = {s = s.s} ;
UttNP np = {s = np.s} ;
PredVPS np vp = {s = np.s ++ vp.compl ++ vp.verb.s ! VPresent} ;
UseV v = {verb = v ; compl = []} ;
UttNP np = {s = np.s ! NBare} ;
PredVPS np vp = {s = np.s ! NSubject ++ vp.compl ! NObject ++ vp.verb.s ! VPresent} ;
UseV v = {verb = v ; compl = {s = \\_ => []}} ;
ComplV2 v2 np = {verb = v2 ; compl = np.s};
UseN n = n ;
DetCN det cn = {s = det.s ++ cn.s} ;
@@ -143,7 +143,7 @@ lin woman_N = mkN "여자" ;
oper
mkN : Str -> Noun
= \s -> lin N {s = s} ;
= \s -> lin N (noun s) ;
mkV : Str -> V = \lemma -> lin V (regVerb lemma) ;