mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-27 11:48:55 -06:00
refined the check whether a complement has a preposition by adding a parameter, in Ger
This commit is contained in:
@@ -75,7 +75,7 @@ concrete CatGer of Cat =
|
|||||||
|
|
||||||
Conj = {s1,s2 : Str ; n : Number} ;
|
Conj = {s1,s2 : Str ; n : Number} ;
|
||||||
Subj = {s : Str} ;
|
Subj = {s : Str} ;
|
||||||
Prep = {s : Str ; c : PCase} ;
|
Prep = Preposition ;
|
||||||
|
|
||||||
-- Open lexical classes, e.g. Lexicon
|
-- Open lexical classes, e.g. Lexicon
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ oper
|
|||||||
-- For $StructuralGer$.
|
-- For $StructuralGer$.
|
||||||
|
|
||||||
mkPrep : Str -> PCase -> Preposition = \s,c ->
|
mkPrep : Str -> PCase -> Preposition = \s,c ->
|
||||||
{s = s ; c = c} ;
|
{s = s ; c = c ; isPrep = True} ;
|
||||||
|
|
||||||
nameNounPhrase : {s : Case => Str} -> {s : PCase => Str ; a : Agr ; isPron : Bool} = \name -> heavyNP {
|
nameNounPhrase : {s : Case => Str} -> {s : PCase => Str ; a : Agr ; isPron : Bool} = \name -> heavyNP {
|
||||||
s = \\c => usePrepC c (\k -> name.s ! k) ;
|
s = \\c => usePrepC c (\k -> name.s ! k) ;
|
||||||
|
|||||||
@@ -351,7 +351,7 @@ mkV2 : overload {
|
|||||||
|
|
||||||
|
|
||||||
mmkN2 : N -> Prep -> N2 = \n,p -> n ** {c2 = p ; lock_N2 = <>} ;
|
mmkN2 : N -> Prep -> N2 = \n,p -> n ** {c2 = p ; lock_N2 = <>} ;
|
||||||
vonN2 : N -> N2 = \n -> n ** {c2 = {s = "von" ; c = dative} ; lock_N2 = <>} ;
|
vonN2 : N -> N2 = \n -> n ** {c2 = von_Prep ; lock_N2 = <>} ;
|
||||||
|
|
||||||
mkN3 = \n,p,q -> n ** {c2 = p ; c3 = q ; lock_N3 = <>} ;
|
mkN3 = \n,p,q -> n ** {c2 = p ; c3 = q ; lock_N3 = <>} ;
|
||||||
|
|
||||||
@@ -397,10 +397,10 @@ mkV2 : overload {
|
|||||||
|
|
||||||
mkAdv s = {s = s ; lock_Adv = <>} ;
|
mkAdv s = {s = s ; lock_Adv = <>} ;
|
||||||
|
|
||||||
mkPrep s c = {s = s ; c = c ; lock_Prep = <>} ;
|
mkPrep s c = {s = s ; c = c ; isPrep = True ; lock_Prep = <>} ;
|
||||||
accPrep = mkPrep [] accusative ;
|
accPrep = {s = [] ; c = accusative ; isPrep = False ; lock_Prep = <>} ;
|
||||||
datPrep = mkPrep [] dative ;
|
datPrep = {s = [] ; c = dative ; isPrep = False ; lock_Prep = <>} ;
|
||||||
genPrep = mkPrep [] genitive ;
|
genPrep = {s = [] ; c = genitive ; isPrep = False ; lock_Prep = <>} ;
|
||||||
--von_Prep = mkPrep "von" dative ;
|
--von_Prep = mkPrep "von" dative ;
|
||||||
von_Prep = mkPrep [] vonDat_Case ;
|
von_Prep = mkPrep [] vonDat_Case ;
|
||||||
zu_Prep = mkPrep [] zuDat_Case ;
|
zu_Prep = mkPrep [] zuDat_Case ;
|
||||||
@@ -472,8 +472,8 @@ mkV2 : overload {
|
|||||||
werden_V = MorphoGer.werden_V ** {lock_V = <>} ;
|
werden_V = MorphoGer.werden_V ** {lock_V = <>} ;
|
||||||
|
|
||||||
prepV2 v c = v ** {c2 = c ; lock_V2 = <>} ;
|
prepV2 v c = v ** {c2 = c ; lock_V2 = <>} ;
|
||||||
dirV2 v = prepV2 v (mkPrep [] accusative) ;
|
dirV2 v = prepV2 v accPrep ;
|
||||||
datV2 v = prepV2 v (mkPrep [] dative) ;
|
datV2 v = prepV2 v datPrep ;
|
||||||
|
|
||||||
mkV3 v c d = v ** {c2 = c ; c3 = d ; lock_V3 = <>} ;
|
mkV3 v c d = v ** {c2 = c ; c3 = d ; lock_V3 = <>} ;
|
||||||
dirV3 v p = mkV3 v (mkPrep [] accusative) p ;
|
dirV3 v p = mkV3 v (mkPrep [] accusative) p ;
|
||||||
|
|||||||
@@ -344,7 +344,7 @@ resource ResGer = ParamX ** open Prelude in {
|
|||||||
|
|
||||||
-- Prepositions for complements indicate the complement case.
|
-- Prepositions for complements indicate the complement case.
|
||||||
|
|
||||||
Preposition : Type = {s : Str ; c : PCase} ;
|
Preposition : Type = {s : Str ; c : PCase ; isPrep : Bool} ;
|
||||||
|
|
||||||
-- To apply a preposition to a complement.
|
-- To apply a preposition to a complement.
|
||||||
|
|
||||||
@@ -354,7 +354,7 @@ resource ResGer = ParamX ** open Prelude in {
|
|||||||
-- To build a preposition from just a case.
|
-- To build a preposition from just a case.
|
||||||
|
|
||||||
noPreposition : Case -> Preposition = \c ->
|
noPreposition : Case -> Preposition = \c ->
|
||||||
{s = [] ; c = NPC c} ;
|
{s = [] ; c = NPC c ; isPrep = False} ;
|
||||||
|
|
||||||
-- Pronouns and articles
|
-- Pronouns and articles
|
||||||
-- Here we define personal and relative pronouns.
|
-- Here we define personal and relative pronouns.
|
||||||
@@ -608,9 +608,9 @@ resource ResGer = ParamX ** open Prelude in {
|
|||||||
|
|
||||||
isLightComplement : Bool -> Preposition -> Bool = \isPron,prep -> case isPron of {
|
isLightComplement : Bool -> Preposition -> Bool = \isPron,prep -> case isPron of {
|
||||||
False => False ;
|
False => False ;
|
||||||
_ => case prep.c of {
|
_ => case prep.isPrep of {
|
||||||
NPC Acc => True ;
|
True => False ;
|
||||||
_ => False
|
_ => True
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user