forked from GitHub/gf-rgl
(Hun) Add Conj{S,NP,AP} + some conjunctions
This commit is contained in:
@@ -23,17 +23,35 @@ concrete ConjunctionHun of Conjunction =
|
||||
ConsAdv = consrSS comma ;
|
||||
ConjAdv = conjunctSS ;
|
||||
|
||||
--}
|
||||
-}
|
||||
|
||||
|
||||
-- Adverb and other simple {s : Str} types.
|
||||
lincat
|
||||
[Adv],[AdV],[IAdv] = {s1,s2 : Str} ;
|
||||
[Adv],[AdV],[IAdv],[S] = {s1,s2 : Str} ;
|
||||
|
||||
lin
|
||||
BaseAdv, BaseAdV, BaseIAdv = twoSS ;
|
||||
ConsAdv, ConsAdV, ConsIAdv = consrSS comma ;
|
||||
ConjAdv, ConjAdV, ConjIAdv = conjunctDistrSS ;
|
||||
BaseAdv, BaseAdV, BaseIAdv, BaseS = twoSS ;
|
||||
ConsAdv, ConsAdV, ConsIAdv, ConsS = consrSS comma ;
|
||||
ConjAdv, ConjAdV, ConjIAdv, ConjS = conjunctDistrSS ;
|
||||
|
||||
|
||||
lincat
|
||||
[AP] = {s1,s2 : Number => Str} ;
|
||||
|
||||
lin
|
||||
BaseAP = twoTable Number ;
|
||||
ConsAP = consrTable Number comma ;
|
||||
ConjAP = conjunctDistrTable Number ;
|
||||
|
||||
-- Noun phrases
|
||||
lincat
|
||||
[NP] = ResHun.BaseNP ** {s1,s2 : Case => Str} ;
|
||||
|
||||
lin
|
||||
BaseNP x y = twoTable Case x y ** y ;
|
||||
ConsNP x xs = consrTable Case comma x xs ** xs ;
|
||||
ConjNP co xs = conjunctDistrTable Case co xs ** xs ;
|
||||
|
||||
{-
|
||||
-- RS depends on X, Y and Z, otherwise exactly like previous.
|
||||
@@ -46,23 +64,6 @@ lin
|
||||
ConsRS = consrTable … comma ;
|
||||
ConjRS = conjunctDistrTable ;
|
||||
|
||||
lincat
|
||||
[S] = {} ;
|
||||
|
||||
lin
|
||||
BaseS x y = y ** { } ;
|
||||
ConsS x xs =
|
||||
xs ** { } ;
|
||||
ConjS co xs = {} ;
|
||||
|
||||
lincat
|
||||
[AP] = {} ;
|
||||
|
||||
lin
|
||||
BaseAP x y = twoTable … x y ** y ;
|
||||
ConsAP a as = consrTable … comma as a ** as ;
|
||||
ConjAP co as = conjunctDistrTable … co as ** as ;
|
||||
|
||||
lincat
|
||||
[CN] = { } ;
|
||||
|
||||
@@ -79,15 +80,6 @@ lin
|
||||
ConsDAP xs x = xs **
|
||||
ConjDet conj xs = xs **
|
||||
|
||||
|
||||
-- Noun phrases
|
||||
lincat
|
||||
[NP] =
|
||||
|
||||
lin
|
||||
BaseNP x y = twoTable … x y ** y ;
|
||||
ConsNP x xs = consrTable … comma as a ** as ;
|
||||
ConjNP co as = conjunctDistrTable … co as ** as ;
|
||||
-}
|
||||
|
||||
}
|
||||
|
||||
@@ -13,14 +13,16 @@ resource ResHun = NounMorphoHun ** open Prelude, Predef in {
|
||||
-- Noun morphology is in NounMorphoHun
|
||||
|
||||
oper
|
||||
|
||||
NounPhrase : Type = {
|
||||
s : Case => Str ;
|
||||
BaseNP : Type = {
|
||||
agr : Person*Number ;
|
||||
objdef : ObjDef ;
|
||||
empty : Str ; -- standard trick for pro-drop
|
||||
} ;
|
||||
|
||||
NounPhrase : Type = BaseNP ** {
|
||||
s : Case => Str ;
|
||||
} ;
|
||||
|
||||
emptyNP : NounPhrase = {
|
||||
s = \\_ => [] ;
|
||||
agr = <P3,Sg> ;
|
||||
@@ -104,6 +106,13 @@ oper
|
||||
n : Number ;
|
||||
} ;
|
||||
|
||||
mkConj : Str -> Number -> Conj = mkDConj [] ;
|
||||
|
||||
mkDConj : (s1,s2 : Str) -> Number -> Conj = \s1,s2,num -> {
|
||||
s1 = s1 ;
|
||||
s2 = s2 ;
|
||||
n = num ;
|
||||
} ;
|
||||
--------------------------------------------------------------------------------
|
||||
-- Adjectives
|
||||
|
||||
|
||||
@@ -33,16 +33,16 @@ lin somewhere_Adv = ss "" ;
|
||||
lin there7from_Adv = ss "" ;
|
||||
lin there7to_Adv = ss "" ;
|
||||
lin there_Adv = ss "" ;
|
||||
|
||||
-}
|
||||
-------
|
||||
-- Conj
|
||||
|
||||
lin and_Conj =
|
||||
lin or_Conj =
|
||||
lin if_then_Conj =
|
||||
lin both7and_DConj =
|
||||
lin either7or_DConj =
|
||||
|
||||
lin and_Conj = mkConj "és" Pl ;
|
||||
lin or_Conj = mkConj "vagy" Sg ;
|
||||
-- lin if_then_Conj =
|
||||
-- lin both7and_DConj =
|
||||
lin either7or_DConj = mkDConj "vagy" "vagy" Sg ;
|
||||
{-
|
||||
lin but_PConj = ss "" ;
|
||||
lin otherwise_PConj = ss "" ;
|
||||
lin therefore_PConj = ss "" ;
|
||||
|
||||
Reference in New Issue
Block a user