forked from GitHub/comp-syntax-gu-mlt
28 lines
633 B
Plaintext
28 lines
633 B
Plaintext
resource MicroResKor = open Prelude, HangulJamo in {
|
|
param
|
|
VForm = Lemma | VPresent | VPast ;
|
|
|
|
oper
|
|
Noun : Type = {s : Str} ;
|
|
Verb : Type = {s : VForm => Str} ;
|
|
Verb2 : Type = Verb ;
|
|
Adjective : Type = Verb ;
|
|
|
|
lemmaToStem : (lemma : Str) -> Str
|
|
= \lemma -> case lemma of {
|
|
stem + "다" => stem ;
|
|
_ => Predef.error ("lemmaToStem was applied to a non-lemma," ++ lemma)
|
|
} ;
|
|
|
|
regVerb : (lemma : Str) -> Verb
|
|
= \lemma ->
|
|
let stem = lemmaToStem lemma ;
|
|
in {
|
|
s = table {
|
|
Lemma => lemma ;
|
|
VPresent => present_haeyo stem ;
|
|
VPast => past_haeyo stem
|
|
}
|
|
} ;
|
|
}
|