mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-22 19:22:50 -06:00
from AS to Cl in predication
This commit is contained in:
@@ -9,30 +9,28 @@ abstract Predication = Cat ** {
|
|||||||
|
|
||||||
--2 The category of atomic sentences
|
--2 The category of atomic sentences
|
||||||
|
|
||||||
-- These sentences have both a positive and a negative form
|
-- We want to use sentences in positive and negative forms but do not care about
|
||||||
|
-- tenses.
|
||||||
cat
|
|
||||||
AS ;
|
|
||||||
|
|
||||||
fun
|
fun
|
||||||
PosAS : AS -> S ;
|
PosCl : Cl -> S ; -- positive sentence: "x intersects y"
|
||||||
NegAS : AS -> S ;
|
NegCl : Cl -> S ; -- negative sentence: "x doesn't intersect y"
|
||||||
|
|
||||||
--2 Predication patterns.
|
--2 Predication patterns.
|
||||||
|
|
||||||
predV : V -> NP -> AS ; -- one-place verb: "x converges"
|
predV : V -> NP -> Cl ; -- one-place verb: "x converges"
|
||||||
predV2 : V2 -> NP -> NP -> AS ; -- two-place verb: "x intersects y"
|
predV2 : V2 -> NP -> NP -> Cl ; -- two-place verb: "x intersects y"
|
||||||
predV3 : V3 -> NP->NP-> NP -> AS; -- three-place verb: "x intersects y at z"
|
predV3 : V3 -> NP->NP-> NP -> Cl; -- three-place verb: "x intersects y at z"
|
||||||
predVColl : V -> NP -> NP -> AS ; -- collective verb: "x and y intersect"
|
predVColl : V -> NP -> NP -> Cl ; -- collective verb: "x and y intersect"
|
||||||
predA : A -> NP -> AS ; -- one-place adjective: "x is even"
|
predA : A -> NP -> Cl ; -- one-place adjective: "x is even"
|
||||||
predA2 : A2 -> NP -> NP -> AS ; -- two-place adj: "x is divisible by y"
|
predA2 : A2 -> NP -> NP -> Cl ; -- two-place adj: "x is divisible by y"
|
||||||
predAComp : A -> NP -> NP -> AS; -- comparative adj: "x is greater than y"
|
predAComp : A -> NP -> NP -> Cl; -- comparative adj: "x is greater than y"
|
||||||
predAColl : A -> NP -> NP -> AS ; -- collective adj: "x and y are parallel"
|
predAColl : A -> NP -> NP -> Cl ; -- collective adj: "x and y are parallel"
|
||||||
predN : N -> NP -> AS ; -- one-place noun: "x is a point"
|
predN : N -> NP -> Cl ; -- one-place noun: "x is a point"
|
||||||
predN2 : N2 -> NP -> NP -> AS ; -- two-place noun: "x is a divisor of y"
|
predN2 : N2 -> NP -> NP -> Cl ; -- two-place noun: "x is a divisor of y"
|
||||||
predNColl : N -> NP -> NP -> AS ; -- collective noun: "x and y are duals"
|
predNColl : N -> NP -> NP -> Cl ; -- collective noun: "x and y are duals"
|
||||||
predAdv : Adv -> NP -> AS ; -- adverb: "x is inside"
|
predAdv : Adv -> NP -> Cl ; -- adverb: "x is inside"
|
||||||
predPrep : Prep -> NP -> NP -> AS ; -- preposition: "x is outside y"
|
predPrep : Prep -> NP -> NP -> Cl ; -- preposition: "x is outside y"
|
||||||
|
|
||||||
--2 Individual-valued function applications
|
--2 Individual-valued function applications
|
||||||
|
|
||||||
|
|||||||
@@ -2,29 +2,28 @@ incomplete concrete PredicationI of Predication = Cat ** open ParamX, Lang in {
|
|||||||
|
|
||||||
flags optimize = all_subs ;
|
flags optimize = all_subs ;
|
||||||
|
|
||||||
lincat
|
|
||||||
AS = {s : Polarity => S} ;
|
|
||||||
|
|
||||||
lin
|
lin
|
||||||
PosAS as = as.s ! Pos ;
|
PosCl cl = UseCl TPres ASimul PPos cl ;
|
||||||
NegAS as = as.s ! Neg ;
|
NegCl cl = UseCl TPres ASimul PNeg cl ;
|
||||||
|
|
||||||
--2 Predication patterns.
|
--2 Predication patterns.
|
||||||
|
|
||||||
predV v x = mkAS x (UseV v) ;
|
predV v x = PredVP x (UseV v) ;
|
||||||
predV2 v x y = mkAS x (ComplV2 v y) ;
|
predV2 v x y = PredVP x (ComplV2 v y) ;
|
||||||
predV3 v x y z = mkAS x (ComplV3 v y z) ;
|
predV3 v x y z = PredVP x (ComplV3 v y z) ;
|
||||||
predVColl v x y = mkAS (ConjNP and_Conj (BaseNP x y)) (UseV v) ;
|
predVColl v x y = PredVP (ConjNP and_Conj (BaseNP x y)) (UseV v) ;
|
||||||
predA a x = mkAS x (UseComp (CompAP (PositA a))) ;
|
predA a x = PredVP x (UseComp (CompAP (PositA a))) ;
|
||||||
predA2 a x y = mkAS x (UseComp (CompAP (ComplA2 a y))) ;
|
predA2 a x y = PredVP x (UseComp (CompAP (ComplA2 a y))) ;
|
||||||
predAComp a x y = mkAS x (UseComp (CompAP (ComparA a y))) ;
|
predAComp a x y = PredVP x (UseComp (CompAP (ComparA a y))) ;
|
||||||
predAColl a x y = mkAS (ConjNP and_Conj (BaseNP x y)) (UseComp (CompAP (PositA a))) ;
|
predAColl a x y =
|
||||||
predN n x = mkAS x (UseComp (CompNP (DetCN (DetSg IndefSg NoOrd) (UseN n)))) ;
|
PredVP (ConjNP and_Conj (BaseNP x y)) (UseComp (CompAP (PositA a))) ;
|
||||||
predN2 n x y = mkAS x (UseComp (CompNP (DetCN (DetSg IndefSg NoOrd) (ComplN2 n y)))) ;
|
predN n x = PredVP x (UseComp (CompNP (DetCN (DetSg IndefSg NoOrd) (UseN n)))) ;
|
||||||
predNColl n x y = mkAS (ConjNP and_Conj (BaseNP x y))
|
predN2 n x y =
|
||||||
|
PredVP x (UseComp (CompNP (DetCN (DetSg IndefSg NoOrd) (ComplN2 n y)))) ;
|
||||||
|
predNColl n x y = PredVP (ConjNP and_Conj (BaseNP x y))
|
||||||
(UseComp (CompNP (DetCN (DetPl IndefPl NoNum NoOrd) (UseN n)))) ;
|
(UseComp (CompNP (DetCN (DetPl IndefPl NoNum NoOrd) (UseN n)))) ;
|
||||||
predAdv a x = mkAS x (UseComp (CompAdv a)) ;
|
predAdv a x = PredVP x (UseComp (CompAdv a)) ;
|
||||||
predPrep p x y = mkAS x (UseComp (CompAdv (PrepNP p y))) ;
|
predPrep p x y = PredVP x (UseComp (CompAdv (PrepNP p y))) ;
|
||||||
|
|
||||||
--2 Individual-valued function applications
|
--2 Individual-valued function applications
|
||||||
|
|
||||||
@@ -46,13 +45,4 @@ lin
|
|||||||
|
|
||||||
typN2 f n = ComplN2 f (DetCN (DetPl IndefPl NoNum NoOrd) n) ;
|
typN2 f n = ComplN2 f (DetCN (DetPl IndefPl NoNum NoOrd) n) ;
|
||||||
|
|
||||||
|
|
||||||
oper
|
|
||||||
mkAS : NP -> VP -> {s : Polarity => S} = \x,vp -> {
|
|
||||||
s = table {
|
|
||||||
Pos => UseCl TPres ASimul PPos (PredVP x vp) ;
|
|
||||||
Neg => UseCl TPres ASimul PNeg (PredVP x vp)
|
|
||||||
}
|
|
||||||
} ;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user