forked from GitHub/comp-syntax-gu-mlt
Compare commits
1 Commits
main
...
noun-morph
| Author | SHA1 | Date | |
|---|---|---|---|
| 54c02b4be4 |
@@ -11,11 +11,11 @@ concrete MicroLangKor of MicroLang = open MicroResKor, Prelude in {
|
|||||||
Utt = {s : Str} ;
|
Utt = {s : Str} ;
|
||||||
|
|
||||||
S = {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 ;
|
Comp = Noun ;
|
||||||
AP = Adjective ;
|
AP = Adjective ;
|
||||||
CN = Noun ;
|
CN = Noun ;
|
||||||
NP = {s : Str} ;
|
NP = Noun ;
|
||||||
Pron = {s : Str} ;
|
Pron = {s : Str} ;
|
||||||
Det = {s : Str} ;
|
Det = {s : Str} ;
|
||||||
Prep = {s : Str} ;
|
Prep = {s : Str} ;
|
||||||
@@ -27,9 +27,9 @@ concrete MicroLangKor of MicroLang = open MicroResKor, Prelude in {
|
|||||||
|
|
||||||
lin
|
lin
|
||||||
UttS s = {s = s.s} ;
|
UttS s = {s = s.s} ;
|
||||||
UttNP np = {s = np.s} ;
|
UttNP np = {s = np.s ! NBare} ;
|
||||||
PredVPS np vp = {s = np.s ++ vp.compl ++ vp.verb.s ! VPresent} ;
|
PredVPS np vp = {s = np.s ! NSubject ++ vp.compl ! NObject ++ vp.verb.s ! VPresent} ;
|
||||||
UseV v = {verb = v ; compl = []} ;
|
UseV v = {verb = v ; compl = {s = \\_ => []}} ;
|
||||||
ComplV2 v2 np = {verb = v2 ; compl = np.s};
|
ComplV2 v2 np = {verb = v2 ; compl = np.s};
|
||||||
UseN n = n ;
|
UseN n = n ;
|
||||||
DetCN det cn = {s = det.s ++ cn.s} ;
|
DetCN det cn = {s = det.s ++ cn.s} ;
|
||||||
@@ -143,7 +143,7 @@ lin woman_N = mkN "여자" ;
|
|||||||
|
|
||||||
oper
|
oper
|
||||||
mkN : Str -> Noun
|
mkN : Str -> Noun
|
||||||
= \s -> lin N {s = s} ;
|
= \s -> lin N (noun s) ;
|
||||||
|
|
||||||
mkV : Str -> V = \lemma -> lin V (regVerb lemma) ;
|
mkV : Str -> V = \lemma -> lin V (regVerb lemma) ;
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
resource MicroResKor = open Prelude, HangulJamo in {
|
resource MicroResKor = open Prelude, HangulJamo in {
|
||||||
param
|
param
|
||||||
VForm = VLemma | VPresent | VPast | VAdnomial ;
|
VForm = VLemma | VPresent | VPast | VAdnomial ;
|
||||||
|
NForm = NBare | NTopic | NSubject | NObject | NPluralSubject | NPluralTopic ;
|
||||||
|
|
||||||
oper
|
oper
|
||||||
Noun : Type = {s : Str} ;
|
Noun : Type = {s : NForm => Str} ;
|
||||||
Verb : Type = {s : VForm => Str} ;
|
Verb : Type = {s : VForm => Str} ;
|
||||||
Verb2 : Type = Verb ;
|
Verb2 : Type = Verb ;
|
||||||
Adjective : Type = Verb ;
|
Adjective : Type = Verb ;
|
||||||
@@ -31,4 +32,16 @@ resource MicroResKor = open Prelude, HangulJamo in {
|
|||||||
|
|
||||||
regVerb : (lemma : Str) -> Verb = reg False ;
|
regVerb : (lemma : Str) -> Verb = reg False ;
|
||||||
regAdjective : (lemma : Str) -> Adjective = reg True ;
|
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