mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-05-27 17:08:54 -06:00
(Kor) Add param Phono for combining particles with nouns
This commit is contained in:
@@ -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 = {
|
||||
|
||||
@@ -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 ** {
|
||||
|
||||
@@ -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 ->
|
||||
|
||||
@@ -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 ;
|
||||
|
||||
Reference in New Issue
Block a user