1
0
forked from GitHub/gf-rgl

(Kor) Add NForm and some Preps.

This commit is contained in:
Inari Listenmaa
2020-03-11 15:28:27 +01:00
parent 1e1369c523
commit 30ce18e124
8 changed files with 34 additions and 18 deletions

View File

@@ -11,7 +11,7 @@ concrete AdjectiveKor of Adjective = CatKor ** open ResKor, Prelude in {
-- : A -> NP -> AP ; -- : A -> NP -> AP ;
ComparA a np = a ** { ComparA a np = a ** {
compar = np.s compar = np.s ! Bare
} ; } ;
-- : A2 -> NP -> AP ; -- married to her -- : A2 -> NP -> AP ; -- married to her

View File

@@ -1,6 +1,6 @@
concrete AdverbKor of Adverb = CatKor ** open ResKor, ParamKor, ParadigmsKor, Prelude in { concrete AdverbKor of Adverb = CatKor ** open ResKor, ParamKor, ParadigmsKor, Prelude in {
--lin lin
-- : A -> Adv ; -- : A -> Adv ;
--PositAdvAdj adj = { } ; --PositAdvAdj adj = { } ;
@@ -11,7 +11,7 @@ concrete AdverbKor of Adverb = CatKor ** open ResKor, ParamKor, ParadigmsKor, Pr
-- ComparAdvAdjS : CAdv -> A -> S -> Adv ; -- more warmly than he runs -- ComparAdvAdjS : CAdv -> A -> S -> Adv ; -- more warmly than he runs
-- : Prep -> NP -> Adv ; -- : Prep -> NP -> Adv ;
-- PrepNP = PrepNP prep np = {s = glue (np.s ! Bare) prep.s} ;
-- Adverbs can be modified by 'adadjectives', just like adjectives. -- Adverbs can be modified by 'adadjectives', just like adjectives.

View File

@@ -176,7 +176,7 @@ lin girl_N = mkN "여자아이" ;
-- lin horn_N = mkN "" ; -- lin horn_N = mkN "" ;
-- lin horse_N = mkN "" ; -- lin horse_N = mkN "" ;
-- lin hot_A = mkA "" ; -- lin hot_A = mkA "" ;
lin house_N = mkN "guri" ; lin house_N = mkN "" ;
-- lin hunt_V2 = mkV2 "" ; -- lin hunt_V2 = mkV2 "" ;
-- lin husband_N = mkN "" ; -- lin husband_N = mkN "" ;

View File

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

View File

@@ -21,6 +21,7 @@ oper
-- "p" => "b" ; -- "p" => "b" ;
-- _ => s } ; -- _ => s } ;
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
-- Morphophonology -- Morphophonology
@@ -31,11 +32,22 @@ oper
param param
NForm = NForm =
Topic Bare -- no case particle
| Subject | Topic -- 은 or 는
| Object ; | Subject -- 이 or 가
| Object -- 을 or 를
;
oper
allomorph : NForm -> Str -> Str = \nf,s ->
let endsInV : Bool = case s of {_ + #v => True ; _ => False} ;
in case nf of {
Topic => if_then_Str endsInV "은" "는" ;
Subject => if_then_Str endsInV "이" "가" ;
Object => if_then_Str endsInV "을" "를" ;
Bare => []
} ;
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
-- Numerals -- Numerals
@@ -56,7 +68,9 @@ oper
-- Adjectives -- Adjectives
param param
AForm = AdjPres | AdjPast ; -- TODO: proper thing AForm =
AAttr |
APred VForm ;
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
-- Prepositions -- Prepositions

View File

@@ -5,7 +5,7 @@ resource ResKor = ParamKor ** open Prelude, Predef, ParamKor in {
oper oper
Noun : Type = { Noun : Type = {
s : Str s : NForm => Str
} ; } ;
Noun2 : Type = Noun ; -- TODO eventually more parameters? Noun2 : Type = Noun ; -- TODO eventually more parameters?
Noun3 : Type = Noun ; Noun3 : Type = Noun ;
@@ -15,7 +15,9 @@ oper
PNoun : Type = Noun ; PNoun : Type = Noun ;
mkNoun : Str -> Noun = \str -> ss str ; mkNoun : Str -> Noun = \str -> {
s = \\cas => str + allomorph cas str
} ;
useN : Noun -> CNoun = \n -> n ; useN : Noun -> CNoun = \n -> n ;
@@ -185,7 +187,7 @@ oper
predVPslash = predVP ; -- VP==VPSlash, Cl==ClSlash predVPslash = predVP ; -- VP==VPSlash, Cl==ClSlash
predVP : NounPhrase -> VerbPhrase -> ClSlash = \np,vp -> vp ** { predVP : NounPhrase -> VerbPhrase -> ClSlash = \np,vp -> vp ** {
s = \\t,a,p => np.s s = \\t,a,p => np.s ! Topic
++ vp.aComp ++ vp.nComp -- TODO: embed copula into complement ++ vp.aComp ++ vp.nComp -- TODO: embed copula into complement
++ vp.s ! VFin Gnomic Pos -- TODO: actual forms ++ vp.s ! VFin Gnomic Pos -- TODO: actual forms
} ; } ;

View File

@@ -104,12 +104,12 @@ oper
-- lin for_Prep = mkPrep ; -- lin for_Prep = mkPrep ;
-- lin from_Prep = mkPrep "" ; -- lin from_Prep = mkPrep "" ;
-- lin in8front_Prep = mkPrep "" ; -- lin in8front_Prep = mkPrep "" ;
-- lin in_Prep = mkPrep "" ; lin in_Prep = mkPrep "에서" ;
-- lin on_Prep = mkPrep "" ; -- lin on_Prep = mkPrep "에서" ;
-- lin part_Prep = mkPrep ; -- lin part_Prep = mkPrep ;
-- lin possess_Prep = mkPrep ; lin possess_Prep = mkPrep "의" ;
-- lin through_Prep = mkPrep ; -- lin through_Prep = mkPrep ;
-- lin to_Prep = mkPrep ; lin to_Prep = mkPrep "에";
-- lin under_Prep = mkPrep "" ; -- lin under_Prep = mkPrep "" ;
-- lin with_Prep = mkPrep "" ; -- lin with_Prep = mkPrep "" ;
-- lin without_Prep = mkPrep "" ; -- lin without_Prep = mkPrep "" ;

View File

@@ -119,12 +119,12 @@ lin
-- : CN -> Comp ; -- : CN -> Comp ;
CompCN cn = emptyComp ** { CompCN cn = emptyComp ** {
aComp = cn.s ; -- TODO: num. I am [a house that sleeps here] vs. we are [houses that sleep here] aComp = cn.s ! Bare ; -- TODO: num. I am [a house that sleeps here] vs. we are [houses that sleep here]
} ; } ;
-- NP -> Comp ; -- NP -> Comp ;
CompNP np = emptyComp ** { CompNP np = emptyComp ** {
nComp = np.s ; -- ! Object ; nComp = np.s ! Bare ;
} ; } ;
-- : Adv -> Comp ; -- : Adv -> Comp ;