From 399e92c8f7e4497524a36509103bef5d5f9677ed Mon Sep 17 00:00:00 2001 From: aarne Date: Wed, 18 Jan 2006 17:27:52 +0000 Subject: [PATCH] added AdvCN ; some German morpho bug fixes --- lib/resource-1.0/abstract/Noun.gf | 13 ++++++++----- lib/resource-1.0/english/NounEng.gf | 1 + lib/resource-1.0/german/BasicGer.gf | 2 +- lib/resource-1.0/german/MorphoGer.gf | 3 ++- lib/resource-1.0/german/NounGer.gf | 5 +++++ lib/resource-1.0/german/ParadigmsGer.gf | 4 ++-- lib/resource-1.0/scandinavian/NounScand.gf | 8 +++++++- 7 files changed, 26 insertions(+), 10 deletions(-) diff --git a/lib/resource-1.0/abstract/Noun.gf b/lib/resource-1.0/abstract/Noun.gf index d3622ad0f..b49b3041d 100644 --- a/lib/resource-1.0/abstract/Noun.gf +++ b/lib/resource-1.0/abstract/Noun.gf @@ -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 diff --git a/lib/resource-1.0/english/NounEng.gf b/lib/resource-1.0/english/NounEng.gf index efffc38ea..f2731153b 100644 --- a/lib/resource-1.0/english/NounEng.gf +++ b/lib/resource-1.0/english/NounEng.gf @@ -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} ; diff --git a/lib/resource-1.0/german/BasicGer.gf b/lib/resource-1.0/german/BasicGer.gf index 7624e4c9f..10252947d 100644 --- a/lib/resource-1.0/german/BasicGer.gf +++ b/lib/resource-1.0/german/BasicGer.gf @@ -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 ; diff --git a/lib/resource-1.0/german/MorphoGer.gf b/lib/resource-1.0/german/MorphoGer.gf index d7c8d0f99..11dfc5d87 100644 --- a/lib/resource-1.0/german/MorphoGer.gf +++ b/lib/resource-1.0/german/MorphoGer.gf @@ -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 { diff --git a/lib/resource-1.0/german/NounGer.gf b/lib/resource-1.0/german/NounGer.gf index 38f6d9561..1b63a9c25 100644 --- a/lib/resource-1.0/german/NounGer.gf +++ b/lib/resource-1.0/german/NounGer.gf @@ -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 + } ; + } diff --git a/lib/resource-1.0/german/ParadigmsGer.gf b/lib/resource-1.0/german/ParadigmsGer.gf index e27750af3..b1d891dd1 100644 --- a/lib/resource-1.0/german/ParadigmsGer.gf +++ b/lib/resource-1.0/german/ParadigmsGer.gf @@ -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 -> diff --git a/lib/resource-1.0/scandinavian/NounScand.gf b/lib/resource-1.0/scandinavian/NounScand.gf index 545f4fe75..853e489d2 100644 --- a/lib/resource-1.0/scandinavian/NounScand.gf +++ b/lib/resource-1.0/scandinavian/NounScand.gf @@ -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 + } ; }