mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-09 04:59:31 -06:00
added AdvCN ; some German morpho bug fixes
This commit is contained in:
@@ -99,13 +99,16 @@ abstract Noun = Cat ** {
|
||||
-- Relational nouns can also be used without their arguments.
|
||||
-- The semantics is typically derivative of the relational meaning.
|
||||
|
||||
UseN2 : N2 -> CN ; -- son
|
||||
UseN3 : N3 -> CN ; -- flight
|
||||
UseN2 : N2 -> CN ; -- son
|
||||
UseN3 : N3 -> CN ; -- flight
|
||||
|
||||
-- Nouns can be modified by adjectives and relative clauses.
|
||||
-- Nouns can be modified by adjectives, relative clauses, and adverbs
|
||||
-- (the last rule will give rise to many 'PP attachement' ambiguities
|
||||
-- when used in connection with verb phrases).
|
||||
|
||||
AdjCN : AP -> CN -> CN ; -- big house
|
||||
RelCN : CN -> RS -> CN ; -- house that John owns
|
||||
AdjCN : AP -> CN -> CN ; -- big house
|
||||
RelCN : CN -> RS -> CN ; -- house that John owns
|
||||
AdvCN : CN -> Adv -> CN ; -- house on the hill
|
||||
|
||||
-- Nouns can also be modified by embedded sentences and questions.
|
||||
-- For some nouns this makes little sense, but we leave this for applications
|
||||
|
||||
@@ -59,6 +59,7 @@ concrete NounEng of Noun = CatEng ** open ResEng, Prelude in {
|
||||
s = \\n,c => preOrPost ap.isPre (ap.s ! agrP3 n) (cn.s ! n ! c)
|
||||
} ;
|
||||
RelCN cn rs = {s = \\n,c => cn.s ! n ! c ++ rs.s ! {n = n ; p = P3}} ;
|
||||
AdvCN cn ad = {s = \\n,c => cn.s ! n ! c ++ ad.s} ;
|
||||
|
||||
SentCN cn sc = {s = \\n,c => cn.s ! n ! c ++ sc.s} ;
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ lin
|
||||
buy_V2 = dirV2 (regV "kaufen") ;
|
||||
camera_N = reg2N "Kamera" "Kameras" feminine ;
|
||||
cap_N = regN "Mütze" ;
|
||||
car_N = reg2N "Wagen" "Wagen" masculine ;
|
||||
car_N = regN "Wagen" ;
|
||||
carpet_N = regN "Teppich" ;
|
||||
cat_N = regN "Katze" ;
|
||||
ceiling_N = reg2N "Dach" "Dächer" neuter ;
|
||||
|
||||
@@ -34,7 +34,8 @@ oper
|
||||
_ => hund + variants {"s" ; "es"}
|
||||
} ;
|
||||
pluralN : Str -> Str = \hund -> case hund of {
|
||||
_ + ("el" | "en" | "er" | "e") => hund + "n" ;
|
||||
_ + ("el" | "er" | "e") => hund + "n" ;
|
||||
_ + "en" => hund ;
|
||||
_ => hund + "en"
|
||||
} ;
|
||||
dativE : Str -> Str = \hund -> case hund of {
|
||||
|
||||
@@ -132,4 +132,9 @@ concrete NounGer of Noun = CatGer ** open ResGer, Prelude in {
|
||||
g = cn.g
|
||||
} ;
|
||||
|
||||
AdvCN cn s = {
|
||||
s = \\a,n,c => cn.s ! a ! n ! c ++ s.s ;
|
||||
g = cn.g
|
||||
} ;
|
||||
|
||||
}
|
||||
|
||||
@@ -260,8 +260,8 @@ oper
|
||||
regN : Str -> N = \hund -> case hund of {
|
||||
_ + "e" => mkN hund hund hund hund (hund + "n") (hund + "n") Fem ;
|
||||
_ + ("ion" | "ung") => mkN hund hund hund hund (hund + "en") (hund + "en") Fem ;
|
||||
_ + ("er" | "en" | "el") => mkN hund hund hund (genitS hund) hund (hund + "n") Masc ;
|
||||
_ => mkN hund hund hund (genitS hund) (hund + "e") (hund + "en") Masc
|
||||
_ + ("er" | "en" | "el") => mkN hund hund hund (genitS hund) hund (pluralN hund) Masc ;
|
||||
_ => mkN hund hund hund (genitS hund) (hund + "e") (pluralN hund) Masc
|
||||
} ;
|
||||
|
||||
reg2N : (x1,x2 : Str) -> Gender -> N = \hund,hunde,g ->
|
||||
|
||||
@@ -33,7 +33,8 @@ incomplete concrete NounScand of Noun =
|
||||
det = quant.det
|
||||
} ;
|
||||
DetPl quant num ord = {
|
||||
s = \\b,g => quant.s ! (orB b (orB num.isDet ord.isDet)) ! g ++ ord.s ;
|
||||
s = \\b,g => quant.s ! (orB b (orB num.isDet ord.isDet)) ! g ++
|
||||
num.s ! g ++ ord.s ;
|
||||
n = Pl ;
|
||||
det = quant.det
|
||||
} ;
|
||||
@@ -116,5 +117,10 @@ incomplete concrete NounScand of Noun =
|
||||
g = g ;
|
||||
isMod = cn.isMod
|
||||
} ;
|
||||
AdvCN cn sc = let g = cn.g in {
|
||||
s = \\n,d,c => cn.s ! n ! d ! c ++ sc.s ;
|
||||
g = g ;
|
||||
isMod = cn.isMod
|
||||
} ;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user