mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-23 01:52:50 -06:00
Changed some function names, added derived libraries.
This commit is contained in:
@@ -120,7 +120,7 @@ lin
|
||||
|
||||
UseN = noun2CommNounPhrase ;
|
||||
ModGenOne = npGenDet Sg noNum ;
|
||||
ModGenMany = npGenDet Pl ;
|
||||
ModGenNum = npGenDet Pl ;
|
||||
UseFun = funAsCommNounPhrase ;
|
||||
AppFun = appFunComm ;
|
||||
AppFun2 = appFun2 ;
|
||||
@@ -135,20 +135,11 @@ lin
|
||||
|
||||
DetNP = detNounPhrase ;
|
||||
IndefOneNP = indefNounPhrase Sg ;
|
||||
IndefManyNP = indefNounPhraseNum Pl ;
|
||||
IndefNumNP = indefNounPhraseNum Pl ;
|
||||
DefOneNP = indefNounPhrase Sg ;
|
||||
DefManyNP = indefNounPhraseNum Pl ;
|
||||
DefNumNP = indefNounPhraseNum Pl ;
|
||||
MassNP = indefNounPhrase Sg;
|
||||
|
||||
--PosV = predVerb True ;
|
||||
--NegV = predVerb False ;
|
||||
--PosCN = predCommNoun True ;
|
||||
--NegCN = predCommNoun False ;
|
||||
--PosNP = predNounPhrase True ;
|
||||
--NegNP = predNounPhrase False ;
|
||||
--PosVS = complSentVerb True ;
|
||||
--NegVS = complSentVerb False ;
|
||||
|
||||
PosVG = predVerbGroup True ;
|
||||
NegVG = predVerbGroup False ;
|
||||
|
||||
|
||||
@@ -1,76 +1,6 @@
|
||||
-- predication library, built on resource grammar. AR 2002--2003
|
||||
--# -path=.:../abstract:../../prelude
|
||||
|
||||
-- Users of the library should *not* look into this file, but only into
|
||||
-- $predication.Types.gf$.
|
||||
resource PredicationRus = Predication with
|
||||
(Resource = ResourceRus), (ResourceExt = ResourceExtRus) ;
|
||||
|
||||
resource PredicationRus = open ResourceRus in {
|
||||
|
||||
-- We first define a set of predication patterns.
|
||||
|
||||
oper
|
||||
predV1 : V -> NP -> S ; -- one-place verb: "John walks"
|
||||
predV2 : TV -> NP -> NP -> S ; -- two-place verb: "John loves Mary"
|
||||
predVColl : V -> NP -> NP -> S ; -- collective verb: "John and Mary fight"
|
||||
predA1 : Adj1 -> NP -> S ; -- one-place adjective: "John is old"
|
||||
predA2 : Adj2 -> NP -> NP -> S ; -- two-place adj: "John is married to Mary"
|
||||
predAComp : AdjDeg -> NP -> NP -> S ; -- compar adj: "John is older than Mary"
|
||||
predAColl : Adj1 -> NP -> NP -> S ; -- collective adj: "John and Mary are married"
|
||||
predN1 : N -> NP -> S ; -- one-place noun: "John is a man"
|
||||
predN2 : Fun -> NP -> NP -> S ; -- two-place noun: "John is a lover of Mary"
|
||||
predNColl : N -> NP -> NP -> S ; -- collective noun: "John and Mary are lovers"
|
||||
|
||||
-- Individual-valued function applications.
|
||||
|
||||
appFun1 : Fun -> NP -> NP ; -- one-place function: "the successor of x"
|
||||
appFunColl : Fun -> NP -> NP -> NP ; -- collective function: "the sum of x and y"
|
||||
|
||||
-- Families of types, expressed by common nouns depending on arguments.
|
||||
|
||||
appFam1 : Fun -> NP -> CN ; -- one-place family: "divisor of x"
|
||||
appFamColl : Fun -> NP -> NP -> CN ; -- collective family: "path between x and y"
|
||||
|
||||
-- Type constructor, similar to a family except that the argument is a type.
|
||||
|
||||
constrTyp1 : Fun -> CN -> CN ;
|
||||
|
||||
-- Logical connectives on two sentences.
|
||||
|
||||
conjS : S -> S -> S ;
|
||||
disjS : S -> S -> S ;
|
||||
implS : S -> S -> S ;
|
||||
|
||||
-- As an auxiliary, we need two-place conjunction of names ("John and Mary"),
|
||||
-- used in collective predication.
|
||||
|
||||
conjNP : NP -> NP -> NP ;
|
||||
|
||||
|
||||
-----------------------------
|
||||
oper
|
||||
|
||||
predV1 = \F, x -> PredVP x (PosVG (PredV F)) ;
|
||||
predV2 = \F, x, y -> PredVP x (PosVG (PredTV F y)) ;
|
||||
predVColl = \F, x, y -> PredVP (conjNP x y) (PosVG (PredV F)) ;
|
||||
predA1 = \F, x -> PredVP x (PosVG (PredAP (AdjP1 F))) ;
|
||||
predA2 = \F, x, y -> PredVP x (PosVG (PredAP (ComplAdj F y))) ;
|
||||
predAComp = \F, x, y -> PredVP x (PosVG (PredAP (ComparAdjP F y))) ;
|
||||
predAColl = \F, x, y -> PredVP (conjNP x y) (PosVG (PredAP (AdjP1 F))) ;
|
||||
predN1 = \F, x -> PredVP x (PosVG (PredCN (UseN F))) ;
|
||||
predN2 = \F, x, y -> PredVP x (PosVG (PredCN (AppFun F y))) ;
|
||||
predNColl = \F, x, y -> PredVP (conjNP x y) (PosVG (PredCN (UseN F))) ;
|
||||
|
||||
appFun1 = \f, x -> DefOneNP (AppFun f x) ;
|
||||
appFunColl = \f, x, y -> DefOneNP (AppFun f (conjNP x y)) ;
|
||||
|
||||
appFam1 = \F, x -> AppFun F x ;
|
||||
appFamColl = \F, x, y -> AppFun F (conjNP x y) ;
|
||||
|
||||
conjS = \A, B -> ConjS AndConj (TwoS A B) ;
|
||||
disjS = \A, B -> ConjS OrConj (TwoS A B) ;
|
||||
implS = \A, B -> SubjS IfSubj A B ;
|
||||
|
||||
constrTyp1 = \F, A -> AppFun F (IndefOneNP A) ;
|
||||
|
||||
conjNP = \x, y -> ConjNP AndConj (TwoNP x y) ;
|
||||
|
||||
};
|
||||
-- this is the standard form of a derived resource. AR 12/1/2004
|
||||
|
||||
4
lib/resource-0.6/russian/ResourceExtRus.gf
Normal file
4
lib/resource-0.6/russian/ResourceExtRus.gf
Normal file
@@ -0,0 +1,4 @@
|
||||
--# -path=.:../abstract:../../prelude
|
||||
|
||||
resource ResourceExtRus = ResourceExt with (Resource = ResourceRus) ;
|
||||
|
||||
@@ -29,17 +29,17 @@ lin
|
||||
ThouNP = pron2NounPhrase pronTu Animate;
|
||||
HeNP = pron2NounPhrase pronOn Animate;
|
||||
SheNP = pron2NounPhrase pronOna Animate;
|
||||
ItNP= pron2NounPhrase pronOno Inanimate;
|
||||
WeNP = pronWithNum (pron2NounPhrase pronMu Animate);
|
||||
YeNP = pronWithNum (pron2NounPhrase pronVu Animate);
|
||||
ItNP = pron2NounPhrase pronOno Inanimate;
|
||||
WeNumNP = pronWithNum (pron2NounPhrase pronMu Animate);
|
||||
YeNumNP = pronWithNum (pron2NounPhrase pronVu Animate);
|
||||
YouNP = pron2NounPhrase pronVu Animate;
|
||||
TheyNP = pron2NounPhrase pronOni Animate;
|
||||
|
||||
EveryDet = kazhdujDet ** {n = Sg ; g = PNoGen; c= Nom} ;
|
||||
AllDet = vesDet ** {n = Sg; g = PNoGen; c = Nom} ;
|
||||
AllsDet = mkDeterminerNum (vseDetPl ** {n = Pl; g = PNoGen; c = Nom} );
|
||||
AllMassDet = vesDet ** {n = Sg; g = PNoGen; c = Nom} ;
|
||||
AllNumDet = mkDeterminerNum (vseDetPl ** {n = Pl; g = PNoGen; c = Nom} );
|
||||
WhichDet = kotorujDet ** {n = Sg; g = PNoGen; c= Nom} ;
|
||||
WhichsDet = mkDeterminerNum (kotorujDet ** {n = Pl; g = PNoGen; c= Nom} );
|
||||
WhichNumDet = mkDeterminerNum (kotorujDet ** {n = Pl; g = PNoGen; c= Nom} );
|
||||
MostDet = bolshinstvoSgDet ** {n = Sg; g = (PGen Neut); c= Gen} ;
|
||||
-- inanimate, Sg: "большинство телефонов безмолству-ет"
|
||||
MostsDet = bolshinstvoPlDet ** {n = Pl; g = (PGen Neut); c= Gen} ;
|
||||
@@ -47,21 +47,21 @@ lin
|
||||
ManyDet = mnogoSgDet ** {n = Sg; g = (PGen Neut); c= Gen} ;
|
||||
MuchDet = mnogoSgDet ** {n = Sg; g = (PGen Neut); c= Gen} ; -- same as previous
|
||||
SomeDet = nekotorujDet ** {n = Sg; g = PNoGen; c= Nom} ;
|
||||
SomesDet = mkDeterminerNum (nekotorujDet ** {n = Pl; g = PNoGen; c= Nom} );
|
||||
SomeNumDet = mkDeterminerNum (nekotorujDet ** {n = Pl; g = PNoGen; c= Nom} );
|
||||
AnyDet = lubojDet ** {n = Sg; g = PNoGen; c= Nom} ;
|
||||
AnysDet = mkDeterminerNum (lubojDet ** {n = Pl; g = PNoGen; c= Nom} );
|
||||
AnyNumDet = mkDeterminerNum (lubojDet ** {n = Pl; g = PNoGen; c= Nom} );
|
||||
NoDet = nikakojDet ** {n = Sg; g = PNoGen; c= Nom} ;
|
||||
NosDet = mkDeterminerNum (nikakojDet ** {n = Pl; g = PNoGen; c= Nom} );
|
||||
NoNumDet = mkDeterminerNum (nikakojDet ** {n = Pl; g = PNoGen; c= Nom} );
|
||||
ThisDet = etotDet ** {n = Sg; g = PNoGen; c= Nom} ;
|
||||
TheseDet = mkDeterminerNum (etotDet ** {n = Pl; g = PNoGen; c= Nom} );
|
||||
TheseNumDet = mkDeterminerNum (etotDet ** {n = Pl; g = PNoGen; c= Nom} );
|
||||
ThatDet = totDet ** {n = Sg; g = PNoGen; c= Nom} ;
|
||||
ThoseDet = mkDeterminerNum (totDet ** {n = Pl; g = PNoGen; c= Nom} );
|
||||
ThoseNumDet = mkDeterminerNum (totDet ** {n = Pl; g = PNoGen; c= Nom} );
|
||||
|
||||
ThisNP = det2NounPhrase etotDet ; -- inanimate form only
|
||||
ThatNP = det2NounPhrase totDet ; -- inanimate form only
|
||||
TheseNP n = { s =\\_ => [] ; n = Pl; p = P3; g= PGen Fem ; anim = Animate ; pron = True} ;
|
||||
TheseNumNP n = { s =\\_ => [] ; n = Pl; p = P3; g= PGen Fem ; anim = Animate ; pron = True} ;
|
||||
-- missing in Russian
|
||||
ThoseNP n = { s =\\_ => [] ; n = Pl; p = P3; g=PGen Fem ; anim = Animate ; pron = True} ;
|
||||
ThoseNumNP n = { s =\\_ => [] ; n = Pl; p = P3; g=PGen Fem ; anim = Animate ; pron = True} ;
|
||||
-- missing in Russian
|
||||
|
||||
EverybodyNP = mkNounPhrase Pl (noun2CommNounPhrase (eEnd_Decl "вс")) ;
|
||||
|
||||
Reference in New Issue
Block a user