1
0
forked from GitHub/gf-core

Changed some function names, added derived libraries.

This commit is contained in:
aarne
2004-01-12 16:19:59 +00:00
parent 6fdd67cb84
commit 9c818d8924
31 changed files with 301 additions and 199 deletions

View File

@@ -172,11 +172,11 @@ fun
DetNP : Det -> CN -> NP ; -- "every car"
MassNP : CN -> NP ; -- "wine"
IndefOneNP : CN -> NP ; -- "a car", "cars"
IndefManyNP : Num -> CN -> NP ; -- "houses", "86 houses"
IndefNumNP : Num -> CN -> NP ; -- "houses", "86 houses"
DefOneNP : CN -> NP ; -- "the car"
DefManyNP : Num -> CN -> NP ; -- "the cars", "the 86 cars"
DefNumNP : Num -> CN -> NP ; -- "the cars", "the 86 cars"
ModGenOne : NP -> CN -> NP ; -- "John's car"
ModGenMany : Num -> NP -> CN -> NP ; -- "John's cars", "John's 86 cars"
ModGenNum : Num -> NP -> CN -> NP ; -- "John's cars", "John's 86 cars"
AppFun : Fun -> NP -> CN ; -- "successor of zero"
AppFun2 : Fun2 -> NP -> Fun ; -- "flight from Paris"
CNthatS : CN -> S -> CN ; -- "idea that the Earth is flat"

View File

@@ -0,0 +1,82 @@
--1 A Small Predication Library
--
-- (c) Aarne Ranta 2003 under Gnu GPL.
--
-- This library is built on a language-independent API of
-- resource grammars. It has a common part, the type signatures
-- (defined here), and language-dependent parts. The user of
-- the library should only have to look at the type signatures.
incomplete resource Predication = open Resource, ResourceExt 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 ;
-----------------------------
---- what follows should be an implementation of the preceding
oper
predV1 = \F, x -> PredVP x (PosV F) ;
predV2 = \F, x, y -> PredVP x (PosTV F y) ;
predVColl = \F, x, y -> PredVP (conjNP x y) (PosV F) ;
predA1 = \F, x -> PredVP x (PosA (AdjP1 F)) ;
predA2 = \F, x, y -> PredVP x (PosA (ComplAdj F y)) ;
predAComp = \F, x, y -> PredVP x (PosA (ComparAdjP F y)) ;
predAColl = \F, x, y -> PredVP (conjNP x y) (PosA (AdjP1 F)) ;
predN1 = \F, x -> PredVP x (PosCN (UseN F)) ;
predN2 = \F, x, y -> PredVP x (PosCN (AppFun F y)) ;
predNColl = \F, x, y -> PredVP (conjNP x y) (PosCN (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 (IndefManyNP A) ;
conjNP = \x, y -> ConjNP AndConj (TwoNP x y) ;
} ;

View File

@@ -0,0 +1,36 @@
incomplete resource ResourceExt = open Resource in {
-- Mostly for compatibility with old API (v 0.4). Also for
-- special cases of plural determiners without numerals.
-- AR 12/1/2004
oper
PosV : V -> VP = \x -> PosVG (PredV x) ;
NegV : V -> VP = \x -> NegVG (PredV x) ;
PosTV : TV -> NP -> VP = \x,y -> PosVG (PredTV x y) ;
NegTV : TV -> NP -> VP = \x,y -> NegVG (PredTV x y) ;
PosA : AP -> VP = \x -> PosVG (PredAP x) ;
NegA : AP -> VP = \x -> NegVG (PredAP x) ;
PosCN : CN -> VP = \x -> PosVG (PredCN x) ;
NegCN : CN -> VP = \x -> NegVG (PredCN x) ;
IndefManyNP : CN -> NP = IndefNumNP NoNum ;
DefManyNP : CN -> NP = DefNumNP NoNum ;
ModGenMany : NP -> CN -> NP = ModGenNum NoNum ;
WeNP : NP = WeNumNP NoNum ;
YeNP : NP = YeNumNP NoNum ;
TheseNP : NP = TheseNumNP NoNum ;
ThoseNP : NP = ThoseNumNP NoNum ;
AllDet : Det = AllNumDet NoNum ;
WhichsDet : Det = WhichNumDet NoNum ;
SomesDet : Det = SomeNumDet NoNum ;
AnysDet : Det = AnyNumDet NoNum ;
NosDet : Det = NoNumDet NoNum ;
TheseDet : Det = TheseNumDet NoNum ;
ThoseDet : Det = ThoseNumDet NoNum ;
} ;

View File

@@ -17,19 +17,19 @@ fun
-- Many plural determiners can take a numeral modifier. So can the plural
-- pronouns "we" and "you".
EveryDet, WhichDet, AllDet, -- every, sg which, sg all
EveryDet, WhichDet, AllMassDet, -- every, sg which, sg all
SomeDet, AnyDet, NoDet, -- sg some, any, no
MostDet, MostsDet, ManyDet, MuchDet : Det ; -- sg most, pl most, many, much
ThisDet, ThatDet : Det ; -- this, that
AllsDet, WhichsDet, -- pl all, which (86)
SomesDet, AnysDet, NosDet, -- pl some, any, no
TheseDet, ThoseDet : Num -> Det ; -- these, those (86)
AllNumDet, WhichNumDet, -- pl all, which (86)
SomeNumDet, AnyNumDet, NoNumDet, -- pl some, any, no
TheseNumDet, ThoseNumDet : Num -> Det ; -- these, those (86)
ThisNP, ThatNP : NP ; -- this, that
TheseNP, ThoseNP : Num -> NP ; -- these, those (86)
TheseNumNP, ThoseNumNP : Num -> NP ; -- these, those (86)
INP, ThouNP, HeNP, SheNP, ItNP : NP ; -- personal pronouns in singular
WeNP, YeNP : Num -> NP ; -- these pronouns can take numeral
WeNumNP, YeNumNP : Num -> NP ; -- these pronouns can take numeral
TheyNP : NP ; YouNP : NP ; -- they, the polite you
EverybodyNP, SomebodyNP, NobodyNP, -- everybody, somebody, nobody

View File

@@ -82,7 +82,7 @@ lin
UseN = noun2CommNounPhrase ;
ModAdj = modCommNounPhrase ;
ModGenOne = npGenDet singular noNum ;
ModGenMany = npGenDet plural ;
ModGenNum = npGenDet plural ;
UsePN = nameNounPhrase ;
UseFun = funAsCommNounPhrase ;
AppFun = appFunComm ;
@@ -95,9 +95,9 @@ lin
DetNP = detNounPhrase ;
IndefOneNP = indefNounPhrase singular ;
IndefManyNP = indefNounPhraseNum plural ;
IndefNumNP = indefNounPhraseNum plural ;
DefOneNP = defNounPhrase singular ;
DefManyNP = defNounPhraseNum plural ;
DefNumNP = defNounPhraseNum plural ;
MassNP = detNounPhrase (mkDeterminer Sg []) ;
CNthatS = nounThatSentence ;

View File

@@ -0,0 +1,6 @@
--# -path=.:../abstract:../../prelude
resource PredicationEng = Predication with
(Resource = ResourceEng), (ResourceExt = ResourceExtEng) ;
-- this is the standard form of a derived resource. AR 12/1/2004

View File

@@ -0,0 +1,4 @@
--# -path=.:../abstract:../../prelude
resource ResourceExtEng = ResourceExt with (Resource = ResourceEng) ;

View File

@@ -12,35 +12,35 @@ concrete StructuralEng of Structural =
HeNP = pronHe ;
SheNP = pronShe ;
ItNP = pronIt ;
WeNP = pronWithNum pronWe ;
YeNP = pronWithNum pronYouPl ;
WeNumNP = pronWithNum pronWe ;
YeNumNP = pronWithNum pronYouPl ;
YouNP = pronYouSg ;
TheyNP = pronThey ;
EveryDet = everyDet ;
AllDet = mkDeterminer Sg "all" ; --- all the missing
AllsDet = mkDeterminerNum Pl "all" ;
AllMassDet = mkDeterminer Sg "all" ; --- all the missing
AllNumDet = mkDeterminerNum Pl "all" ;
WhichDet = whichDet ;
WhichsDet = mkDeterminerNum Pl "which" ;
WhichNumDet = mkDeterminerNum Pl "which" ;
MostsDet = mostDet ;
MostDet = mkDeterminer Sg "most" ;
SomeDet = mkDeterminer Sg "some" ;
SomesDet = mkDeterminerNum Pl "some" ;
SomeNumDet = mkDeterminerNum Pl "some" ;
AnyDet = mkDeterminer Sg "any" ;
AnysDet = mkDeterminerNum Pl "any" ;
AnyNumDet = mkDeterminerNum Pl "any" ;
NoDet = mkDeterminer Sg "no" ;
NosDet = mkDeterminerNum Pl "no" ;
NoNumDet = mkDeterminerNum Pl "no" ;
ManyDet = mkDeterminer Pl "many" ;
MuchDet = mkDeterminer Sg ["a lot of"] ; ---
ThisDet = mkDeterminer Sg "this" ;
TheseDet = mkDeterminerNum Pl "these" ;
TheseNumDet = mkDeterminerNum Pl "these" ;
ThatDet = mkDeterminer Sg "that" ;
ThoseDet = mkDeterminerNum Pl "those" ;
ThoseNumDet = mkDeterminerNum Pl "those" ;
ThisNP = nameNounPhrase (nameReg "this") ;
ThatNP = nameNounPhrase (nameReg "that") ;
TheseNP n = nameNounPhrase {s = \\c => "these" ++ n.s ! c} ; --- Pl; Gen!
ThoseNP n = nameNounPhrase {s = \\c => "those" ++ n.s ! c} ; --- Pl; Gen!
TheseNumNP n = nameNounPhrase {s = \\c => "these" ++ n.s ! c} ; --- Pl; Gen!
ThoseNumNP n = nameNounPhrase {s = \\c => "those" ++ n.s ! c} ; --- Pl; Gen!
EverybodyNP = nameNounPhrase (nameReg "everybody") ;
SomebodyNP = nameNounPhrase (nameReg "somebody") ;

View File

@@ -81,7 +81,7 @@ lin
UseN = noun2CommNounPhrase ;
ModAdj = modCommNounPhrase ;
ModGenOne = npGenDet singular ;
ModGenMany = npGenDetNum ;
ModGenNum = npGenDetNum ;
UsePN = nameNounPhrase ;
UseFun = funAsCommNounPhrase ;
AppFun = appFunComm ;
@@ -94,9 +94,9 @@ lin
DetNP = detNounPhrase ;
IndefOneNP = indefNounPhrase singular ;
IndefManyNP = nounPhraseNum False ;
IndefNumNP = nounPhraseNum False ;
DefOneNP = defNounPhrase singular ;
DefManyNP = nounPhraseNum True ;
DefNumNP = nounPhraseNum True ;
MassNP = partNounPhrase singular ;
NoNum = noNum ;
UseInt i = {s = \\_ => i.s ; isNum = True} ; --- case endings sometimes needed

View File

@@ -0,0 +1,6 @@
--# -path=.:../abstract:../../prelude
resource PredicationFin = Predication with
(Resource = ResourceFin), (ResourceExt = ResourceExtFin) ;
-- this is the standard form of a derived resource. AR 12/1/2004

View File

@@ -0,0 +1,4 @@
--# -path=.:../abstract:../../prelude
resource ResourceExtFin = ResourceExt with (Resource = ResourceFin) ;

View File

@@ -12,16 +12,16 @@ concrete StructuralFin of Structural =
ThouNP = pronNounPhrase pronSina ;
HeNP = pronNounPhrase pronHan ;
SheNP = pronNounPhrase pronHan ;
WeNP = pronWithNum pronMe ;
YeNP = pronWithNum pronTe ;
WeNumNP = pronWithNum pronMe ;
YeNumNP = pronWithNum pronTe ;
YouNP = pronNounPhrase pronTe ;
TheyNP = pronNounPhrase pronHe ; --- ne
ItNP = nameNounPhrase pronSe ;
ThisNP = pronNounPhraseNP pronTama ;
ThatNP = pronNounPhraseNP pronTuo ;
TheseNP = pronWithNum pronNama ;
ThoseNP = pronWithNum pronNuo ;
TheseNumNP = pronWithNum pronNama ;
ThoseNumNP = pronWithNum pronNuo ;
EverybodyNP = {
s = \\f => kaikkiPron Pl ! (npForm2Case Pl f) ; -- näin kaikki
@@ -60,10 +60,10 @@ concrete StructuralFin of Structural =
} ;
EveryDet = jokainenDet ;
AllDet = mkDeterminer singular (kaikkiPron Sg) ;
AllsDet = kaikkiDet ;
AllMassDet = mkDeterminer singular (kaikkiPron Sg) ;
AllNumDet = kaikkiDet ;
WhichDet = mikaDet ;
WhichsDet n = mkDeterminerGenNum n (mikaInt ! Pl) (kukaInt ! Pl) ;
WhichNumDet n = mkDeterminerGenNum n (mikaInt ! Pl) (kukaInt ! Pl) ;
MostDet = mkDeterminer singular (caseTable singular (sSuurin "enintä")) ;
MostsDet = useimmatDet ;
ManyDet = mkDeterminer singular moniPron ;
@@ -73,24 +73,21 @@ concrete StructuralFin of Structural =
--- with a verb.
AnyDet = mkDeterminerGen Sg (mikaanPron ! Sg) (kukaanPron ! Sg) ;
AnysDet n = mkDeterminerGenNum n (mikaanPron ! Pl) (kukaanPron ! Pl) ;
AnyNumDet n = mkDeterminerGenNum n (mikaanPron ! Pl) (kukaanPron ! Pl) ;
NoDet = mkDeterminerGen Sg
(\\c => "ei" ++ mikaanPron ! Sg ! c)
(\\c => "ei" ++ kukaanPron ! Sg ! c) ;
NosDet n = mkDeterminerGenNum n
NoNumDet n = mkDeterminerGenNum n
(\\c => "ei" ++ mikaanPron ! Pl ! c)
(\\c => "ei" ++ kukaanPron ! Pl ! c) ;
ThisDet = mkDeterminer Sg (\\c => pronTama.s ! PCase c) ;
ThatDet = mkDeterminer Sg (\\c => pronTuo.s ! PCase c) ;
TheseDet n = mkDeterminerNum n (\\c => pronNama.s ! PCase c) ;
ThoseDet n = mkDeterminerNum n (\\c => pronNuo.s ! PCase c) ;
TheseNumDet n = mkDeterminerNum n (\\c => pronNama.s ! PCase c) ;
ThoseNumDet n = mkDeterminerNum n (\\c => pronNuo.s ! PCase c) ;
SomeDet = mkDeterminerGen Sg (jokinPron ! Sg) (jokuPron ! Sg) ;
SomesDet n = mkDeterminerGenNum n (jokinPron ! Pl) (jokuPron ! Pl) ;
--- These two don't work in Finnish sentences.
SomeNumDet n = mkDeterminerGenNum n (jokinPron ! Pl) (jokuPron ! Pl) ;
HowIAdv = ss "kuinka" ;
WhenIAdv = ss "koska" ;

View File

@@ -0,0 +1,6 @@
--# -path=.:../abstract:../romance:../../prelude
resource PredicationFre = Predication with
(Resource = ResourceFre), (ResourceExt = ResourceExtFre) ;
-- this is the standard form of a derived resource. AR 12/1/2004

View File

@@ -0,0 +1,4 @@
--# -path=.:../abstract:../romance:../../prelude
resource ResourceExtFre = ResourceExt with (Resource = ResourceFre) ;

View File

@@ -8,8 +8,8 @@ lin
ThouNP = pronNounPhrase pronTu ;
HeNP = pronNounPhrase pronIl ;
SheNP = pronNounPhrase pronElle ;
WeNP n = pronNounPhrase (pronWithNum pronNous n) ;
YeNP n = pronNounPhrase (pronWithNum pronVous n) ;
WeNumNP n = pronNounPhrase (pronWithNum pronNous n) ;
YeNumNP n = pronNounPhrase (pronWithNum pronVous n) ;
YouNP = pronNounPhrase pronVous ;
TheyNP = pronNounPhrase pronIls ;
@@ -21,30 +21,30 @@ lin
ThisNP = mkNameNounPhrase ["ceci"] Masc ;
ThatNP = mkNameNounPhrase ["ça"] Masc ;
TheseNP n = mkNameNounPhrase ("ceux" ++ n.s ! Masc ++ "ci") Masc ;
ThoseNP n = mkNameNounPhrase ("ceux" ++ n.s ! Masc ++ "là") Masc ;
TheseNumNP n = mkNameNounPhrase ("ceux" ++ n.s ! Masc ++ "ci") Masc ;
ThoseNumNP n = mkNameNounPhrase ("ceux" ++ n.s ! Masc ++ "là") Masc ;
ItNP = pronNounPhrase pronIl ;
EveryDet = chaqueDet ;
AllDet = toutDet ;
AllsDet = tousDet ;
AllMassDet = toutDet ;
AllNumDet = tousDet ;
WhichDet = quelDet ;
WhichsDet = mkDeterminerNum plural "quels" "quelles" ;
WhichNumDet = mkDeterminerNum plural "quels" "quelles" ;
MostsDet = plupartDet ;
MostDet = mkDeterminer1 singular (["la plupart"] ++ elisDe) ; --- de
SomeDet = mkDeterminer1 singular "quelque" ;
SomesDet = mkDeterminerNum plural "quelques" "quelques" ;
NoDet = mkDeterminer singular "aucun" "aucune" ; --- ne
NosDet = mkDeterminerNum plural ("aucun" ++ "des") ("aucune" ++ "des") ; --- ne
SomeNumDet = mkDeterminerNum plural "quelques" "quelques" ;
NoDet = mkDeterminer singular "aucun" "aucune" ; --- ne
NoNumDet = mkDeterminerNum plural ("aucun" ++ "des") ("aucune" ++ "des") ; --- ne
AnyDet = mkDeterminer1 singular "quelque" ; ---
AnysDet = mkDeterminerNum plural "quelques" "quelques" ; ---
AnyNumDet = mkDeterminerNum plural "quelques" "quelques" ; ---
ManyDet = mkDeterminer1 plural "plusieurs" ;
MuchDet = mkDeterminer1 singular ("beaucoup" ++ elisDe) ; --- de
ThisDet = mkDeterminer singular (pre {"ce" ; "cet" / voyelle}) "cette" ; --- ci
ThatDet = mkDeterminer singular (pre {"ce" ; "cet" / voyelle}) "cette" ; --- là
TheseDet = mkDeterminerNum plural "ces" "ces" ; --- ci
ThoseDet = mkDeterminerNum plural "ces" "ces" ; --- là
TheseNumDet = mkDeterminerNum plural "ces" "ces" ; --- ci
ThoseNumDet = mkDeterminerNum plural "ces" "ces" ; --- là
HowIAdv = commentAdv ;
WhenIAdv = quandAdv ;

View File

@@ -84,7 +84,7 @@ lin
UseN = noun2CommNounPhrase ;
ModAdj = modCommNounPhrase ;
ModGenOne = npGenDet singular noNum ;
ModGenMany = npGenDet plural ;
ModGenNum = npGenDet plural ;
UsePN = nameNounPhrase ;
UseFun = funAsCommNounPhrase ;
AppFun = appFunComm ;
@@ -97,9 +97,9 @@ lin
DetNP = detNounPhrase ;
IndefOneNP = indefNounPhrase singular ;
IndefManyNP = plurDetNum ;
IndefNumNP = plurDetNum ;
DefOneNP = defNounPhrase singular ;
DefManyNP nu = defNounPhraseNum nu plural ;
DefNumNP nu = defNounPhraseNum nu plural ;
MassNP = massNounPhrase ;
UseInt i = i ;
NoNum = noNum ;

View File

@@ -0,0 +1,6 @@
--# -path=.:../abstract:../../prelude
resource PredicationGer = Predication with
(Resource = ResourceGer), (ResourceExt = ResourceExtGer) ;
-- this is the standard form of a derived resource. AR 12/1/2004

View File

@@ -0,0 +1,4 @@
--# -path=.:../abstract:../../prelude
resource ResourceExtGer = ResourceExt with (Resource = ResourceGer) ;

View File

@@ -24,8 +24,8 @@ lin
ThouNP = pronNounPhrase pronDu ;
HeNP = pronNounPhrase pronEr ;
SheNP = pronNounPhrase pronSie ;
WeNP n = pronNounPhrase (pronWithNum pronWir n) ;
YeNP n = pronNounPhrase (pronWithNum pronIhr n) ;
WeNumNP n = pronNounPhrase (pronWithNum pronWir n) ;
YeNumNP n = pronNounPhrase (pronWithNum pronIhr n) ;
TheyNP = pronNounPhrase pronSiePl ;
YouNP = pronNounPhrase pronSSie ;
@@ -33,30 +33,30 @@ lin
ItNP = pronNounPhrase pronEs ;
ThisNP = nameNounPhrase {s = dieserDet.s ! Neut} ; ---
ThatNP = nameNounPhrase {s = jenerDet.s ! Neut} ; ---
TheseNP nu = let diese = caselist "diese" "diese" "diesen" "diesen" in
TheseNumNP nu = let diese = caselist "diese" "diese" "diesen" "diesen" in
normalNounPhrase (\\c => diese ! c ++ nu.s) plural ;
ThoseNP nu = let jene = caselist "jene" "jene" "jenen" "jenen" in
ThoseNumNP nu = let jene = caselist "jene" "jene" "jenen" "jenen" in
normalNounPhrase (\\c => jene ! c ++ nu.s) plural ;
AnyDet = detLikeAdj "irgendwelch" ;
AnysDet nu = mkDeterminerNumReg nu "irgendwelche" Weak ;
AnyNumDet nu = mkDeterminerNumReg nu "irgendwelche" Weak ;
EveryDet = jederDet ;
AllDet = allesDet ;
AllsDet = alleDet ;
AllMassDet = allesDet ;
AllNumDet = alleDet ;
WhichDet = welcherDet ;
WhichsDet = welcheDet ;
WhichNumDet = welcheDet ;
MostDet = meistDet ;
MostsDet = meisteDet ;
ManyDet = mkDeterminerPl (caselist "viele" "viele" "vielen" "vieler") Strong ;
MuchDet = detLikeAdj "viel" ;
NoDet = keinDet ;
NosDet nu = mkDeterminerNumReg nu "keine" Strong ;
NoNumDet nu = mkDeterminerNumReg nu "keine" Strong ;
SomeDet = einDet ; ---
SomesDet nu = mkDeterminerNumReg nu "einige" Strong ;
SomeNumDet nu = mkDeterminerNumReg nu "einige" Strong ;
ThatDet = detLikeAdj "jen" ;
ThisDet = detLikeAdj "dies" ;
TheseDet nu = mkDeterminerNumReg nu "diese" Strong ;
ThoseDet nu = mkDeterminerNumReg nu "jene" Strong ;
TheseNumDet nu = mkDeterminerNumReg nu "diese" Strong ;
ThoseNumDet nu = mkDeterminerNumReg nu "jene" Strong ;
HowIAdv = ss "wie" ;
WhenIAdv = ss "wann" ;

View File

@@ -0,0 +1,6 @@
--# -path=.:../abstract:../romance:../../prelude
resource PredicationIta = Predication with
(Resource = ResourceIta), (ResourceExt = ResourceExtIta) ;
-- this is the standard form of a derived resource. AR 12/1/2004

View File

@@ -0,0 +1,4 @@
--# -path=.:../abstract:../romance:../../prelude
resource ResourceExtIta = ResourceExt with (Resource = ResourceIta) ;

View File

@@ -8,8 +8,8 @@ lin
ThouNP = pronNounPhrase pronTu ;
HeNP = pronNounPhrase pronIl ;
SheNP = pronNounPhrase pronElle ;
WeNP n = pronNounPhrase (pronWithNum pronNous n) ;
YeNP n = pronNounPhrase (pronWithNum pronVous n) ;
WeNumNP n = pronNounPhrase (pronWithNum pronNous n) ;
YeNumNP n = pronNounPhrase (pronWithNum pronVous n) ;
YouNP = pronNounPhrase pronVous ;
TheyNP = pronNounPhrase pronIls ;
@@ -21,30 +21,30 @@ lin
ThisNP = mkNameNounPhrase ["questo"] Masc ;
ThatNP = mkNameNounPhrase ["quello"] Masc ;
TheseNP n = mkNameNounPhrase ("questi" ++ n.s ! Masc) Masc ;
ThoseNP n = mkNameNounPhrase ("quelli" ++ n.s ! Masc) Masc ;
TheseNumNP n = mkNameNounPhrase ("questi" ++ n.s ! Masc) Masc ;
ThoseNumNP n = mkNameNounPhrase ("quelli" ++ n.s ! Masc) Masc ;
ItNP = pronNounPhrase pronIl ;
EveryDet = chaqueDet ;
AllDet = mkDeterminer singular "tutto" "tutta" ;
AllsDet = mkDeterminerNum plural ["tutti i"] ["tutte le"] ; --- gli
AllMassDet = mkDeterminer singular "tutto" "tutta" ;
AllNumDet = mkDeterminerNum plural ["tutti i"] ["tutte le"] ; --- gli
WhichDet = quelDet ;
WhichsDet = mkDeterminerNum plural "quali" "quali" ;
WhichNumDet = mkDeterminerNum plural "quali" "quali" ;
MostsDet = plupartDet ;
MostDet = mkDeterminer1 singular (["la maggior parte"] ++ elisDe) ; --- de
SomeDet = mkDeterminer1 singular "qualche" ;
SomesDet = mkDeterminerNum plural "alcuni" "alcune" ;
SomeNumDet = mkDeterminerNum plural "alcuni" "alcune" ;
NoDet = mkDeterminer singular "nessuno" "nessuna" ; --- non
NosDet = mkDeterminerNum plural "nessuni" "nessune" ; ---- ??
NoNumDet = mkDeterminerNum plural "nessuni" "nessune" ; ---- ??
AnyDet = mkDeterminer1 singular "qualche" ; ---
AnysDet = mkDeterminerNum plural "alcuni" "alcune" ; ---
AnyNumDet = mkDeterminerNum plural "alcuni" "alcune" ; ---
ManyDet = mkDeterminer plural "molti" "molte" ;
MuchDet = mkDeterminer1 singular "molto" ;
ThisDet = mkDeterminer singular "questo" "questa" ;
ThatDet = mkDeterminer singular "quello" "quella" ;
TheseDet = mkDeterminerNum plural "questi" "queste" ; --- ci
ThoseDet = mkDeterminerNum plural "quelli" "quelle" ; --- quegli
TheseNumDet = mkDeterminerNum plural "questi" "queste" ; --- ci
ThoseNumDet = mkDeterminerNum plural "quelli" "quelle" ; --- quegli
HowIAdv = commentAdv ;
WhenIAdv = quandAdv ;

View File

@@ -83,7 +83,7 @@ lin
UseN = noun2CommNounPhrase ;
ModAdj = modCommNounPhrase ;
ModGenOne = npGenDet singular ;
ModGenMany = npGenDetNum ;
ModGenNum = npGenDetNum ;
UsePN = nameNounPhrase ;
UseFun = funAsCommNounPhrase ; -- [SyntaxFra.noun2CommNounPhrase]
AppFun = appFunComm ;
@@ -96,9 +96,9 @@ lin
DetNP = detNounPhrase ;
IndefOneNP = indefNounPhrase singular ;
IndefManyNP = indefNounPhraseNum ;
IndefNumNP = indefNounPhraseNum ;
DefOneNP = defNounPhrase singular ;
DefManyNP = defNounPhraseNum ;
DefNumNP = defNounPhraseNum ;
MassNP = partitiveNounPhrase singular ;
UseInt i = {s = \\_ => i.s} ;
NoNum = noNum ;

View File

@@ -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 ;

View File

@@ -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

View File

@@ -0,0 +1,4 @@
--# -path=.:../abstract:../../prelude
resource ResourceExtRus = ResourceExt with (Resource = ResourceRus) ;

View File

@@ -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 "вс")) ;

View File

@@ -83,7 +83,7 @@ lin
UseN = noun2CommNounPhrase ;
ModAdj = modCommNounPhrase ;
ModGenOne = npGenDet singular noNum ;
ModGenMany = npGenDet plural ;
ModGenNum = npGenDet plural ;
UsePN = nameNounPhrase ;
UseFun = funAsCommNounPhrase ;
AppFun = appFunComm ;
@@ -96,9 +96,9 @@ lin
DetNP = detNounPhrase ;
IndefOneNP = indefNounPhrase singular ;
IndefManyNP = indefNounPhraseNum plural ;
IndefNumNP = indefNounPhraseNum plural ;
DefOneNP = defNounPhrase singular ;
DefManyNP = defNounPhraseNum plural ;
DefNumNP = defNounPhraseNum plural ;
MassNP = detNounPhrase (mkDeterminerSg (detSgInvar []) IndefP) ;
UseInt i = {s = table {Nom => i.s ; Gen => i.s ++ "s"}} ; ---
NoNum = noNum ;

View File

@@ -0,0 +1,6 @@
--# -path=.:../abstract:../../prelude
resource PredicationSwe = Predication with
(Resource = ResourceSwe), (ResourceExt = ResourceExtSwe) ;
-- this is the standard form of a derived resource. AR 12/1/2004

View File

@@ -0,0 +1,4 @@
--# -path=.:../abstract:../../prelude
resource ResourceExtSwe = ResourceExt with (Resource = ResourceSwe) ;

View File

@@ -12,8 +12,8 @@ concrete StructuralSwe of Structural =
ThouNP = pronNounPhrase du_33 ;
HeNP = pronNounPhrase han_34 ;
SheNP = pronNounPhrase hon_35 ;
WeNP n = pronNounPhrase (pronWithNum vi_36 n) ;
YeNP n = pronNounPhrase (pronWithNum ni_37 n) ;
WeNumNP n = pronNounPhrase (pronWithNum vi_36 n) ;
YeNumNP n = pronNounPhrase (pronWithNum ni_37 n) ;
TheyNP = pronNounPhrase de_38 ;
YouNP = let {ni = pronNounPhrase ni_37 } in {s = ni.s ; g = ni.g ; n = Sg} ;
@@ -21,20 +21,22 @@ concrete StructuralSwe of Structural =
ItNP = pronNounPhrase det_40 ; ----
ThisNP = regNameNounPhrase ["det här"] Neutr NoMasc ;
ThatNP = regNameNounPhrase ["det där"] Neutr NoMasc ;
TheseNP n = {s = \\c => ["det här"] ++ n.s ! npCase c ; g = Neutr ; n = Pl} ;
ThoseNP n = {s = \\c => ["det där"] ++ n.s ! npCase c ; g = Neutr ; n = Pl} ;
TheseNumNP n =
{s = \\c => ["det här"] ++ n.s ! npCase c ; g = Neutr ; n = Pl} ;
ThoseNumNP n =
{s = \\c => ["det där"] ++ n.s ! npCase c ; g = Neutr ; n = Pl} ;
EveryDet = varjeDet ;
AllDet = mkDeterminerSgGender2 "all" "allt" IndefP ;
AllsDet = mkDeterminerPlNum "alla" IndefP ;
AllMassDet = mkDeterminerSgGender2 "all" "allt" IndefP ;
AllNumDet = mkDeterminerPlNum "alla" IndefP ;
AnyDet = mkDeterminerSgGender2 "någon" "något" IndefP ;
AnysDet = mkDeterminerPlNum "några" IndefP ;
AnyNumDet = mkDeterminerPlNum "några" IndefP ;
SomeDet = mkDeterminerSgGender2 "någon" "något" IndefP ;
SomesDet = mkDeterminerPlNum "några" IndefP ;
SomeNumDet = mkDeterminerPlNum "några" IndefP ;
ManyDet = mkDeterminerPl "många" IndefP ;
NoDet = mkDeterminerSgGender2 "ingen" "inget" IndefP ;
NosDet = mkDeterminerPlNum "inga" IndefP ;
WhichsDet = mkDeterminerPlNum "vilka" IndefP ;
NoNumDet = mkDeterminerPlNum "inga" IndefP ;
WhichNumDet = mkDeterminerPlNum "vilka" IndefP ;
WhichDet = vilkenDet ;
MostDet = mkDeterminerSgGender2 ["den mesta"] ["det mesta"] (DefP Def) ;
@@ -43,8 +45,8 @@ concrete StructuralSwe of Structural =
ThisDet = mkDeterminerSgGender2 ["den här"] ["det här"] (DefP Def) ;
ThatDet = mkDeterminerSgGender2 ["den där"] ["det där"] (DefP Def) ;
TheseDet = mkDeterminerPlNum ["de här"] (DefP Def) ;
ThoseDet = mkDeterminerPlNum ["de där"] (DefP Def) ;
TheseNumDet = mkDeterminerPlNum ["de här"] (DefP Def) ;
ThoseNumDet = mkDeterminerPlNum ["de där"] (DefP Def) ;
HowIAdv = ss "hur" ;
WhenIAdv = ss "när" ;