forked from GitHub/comp-syntax-gu-mlt
wip: noun morphology
This commit is contained in:
@@ -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) ;
|
||||
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
resource MicroResKor = open Prelude, HangulJamo in {
|
||||
param
|
||||
VForm = VLemma | VPresent | VPast | VAdnomial ;
|
||||
NForm = NBare | NTopic | NSubject | NObject | NPluralSubject | NPluralTopic ;
|
||||
|
||||
oper
|
||||
Noun : Type = {s : Str} ;
|
||||
Noun : Type = {s : NForm => Str} ;
|
||||
Verb : Type = {s : VForm => Str} ;
|
||||
Verb2 : Type = Verb ;
|
||||
Adjective : Type = Verb ;
|
||||
@@ -31,4 +32,16 @@ resource MicroResKor = open Prelude, HangulJamo in {
|
||||
|
||||
regVerb : (lemma : Str) -> Verb = reg False ;
|
||||
regAdjective : (lemma : Str) -> Adjective = reg True ;
|
||||
|
||||
noun : (bare : Str) -> Noun
|
||||
= \bare -> {
|
||||
s = table {
|
||||
NBare => bare ;
|
||||
NTopic => bare + vc_allomorph bare "는" "은" ;
|
||||
NSubject => bare + vc_allomorph bare "이" "가" ;
|
||||
NObject => bare + vc_allomorph bare "를" "을" ;
|
||||
NPluralTopic => bare + "들은" ;
|
||||
NPluralSubject => bare + "들이"
|
||||
}
|
||||
} ;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user