1
0
forked from GitHub/gf-rgl

(Kor) Add param Phono for combining particles with nouns

This commit is contained in:
Inari Listenmaa
2020-03-23 14:23:54 +01:00
parent 5322b9d90a
commit 703695b2cb
4 changed files with 8 additions and 4 deletions

View File

@@ -62,7 +62,7 @@ concrete CatKor of Cat = CommonX ** open ResKor, Prelude in {
NP = ResKor.NounPhrase ;
Pron = ResKor.Pronoun ; --Pronouns need enough info to turn it into NP or Quant.
Det = ResKor.Determiner ;
Predet = SS ;
Predet = {s : Phono => Str ; p : Phono} ;
Quant = ResKor.Quant ;
Num = ResKor.Num ;
Ord = {

View File

@@ -7,7 +7,7 @@ concrete NounKor of Noun = CatKor ** open ResKor, Prelude in {
--2 Noun phrases
-- : Det -> CN -> NP
DetCN det cn = {s = \\c => det.s ++ cn.s ! c} ;
DetCN det cn = cn ** {s = \\c => det.s ++ cn.s ! c} ;
-- : PN -> NP ;
-- UsePN pn = pn ** {

View File

@@ -37,6 +37,8 @@ param
| Object -- 을 or 를
;
Phono = Vowel | Consonant ; -- Whether the word ends in vowel or consonant.
oper
allomorph : NForm -> Str -> Str = \nf,s ->

View File

@@ -5,7 +5,8 @@ resource ResKor = ParamKor ** open Prelude, Predef, ParamKor in {
oper
Noun : Type = {
s : NForm => Str
s : NForm => Str ;
p : Phono
} ;
Noun2 : Type = Noun ; -- TODO eventually more parameters?
Noun3 : Type = Noun ;
@@ -16,7 +17,8 @@ oper
PNoun : Type = Noun ;
mkNoun : Str -> Noun = \str -> {
s = \\cas => str + allomorph cas str
s = \\cas => str + allomorph cas str ;
p = if_then_else Phono (vowFinal str) Vowel Consonant ;
} ;
useN : Noun -> CNoun = \n -> n ;