mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-23 09:52:55 -06:00
more English cf
This commit is contained in:
@@ -8,12 +8,14 @@ AP_post ::= "less" A "than" NP ;
|
|||||||
Num ::= "most" A ;
|
Num ::= "most" A ;
|
||||||
Num_Pl ::= "most" A ;
|
Num_Pl ::= "most" A ;
|
||||||
|
|
||||||
ComplAV. AP_post ::= AV Prep VP ;
|
ComplAV. AP_post ::= AV "to" VP ;
|
||||||
UseA2V. AV ::= A2V Prep NP ;
|
UseA2V. AV ::= A2V Prep NP ;
|
||||||
|
|
||||||
PredAS. Cl ::= "it" Cop AS "that" S ;
|
-- is this much too general?
|
||||||
|
SentAP. AP_post ::= AP SC ;
|
||||||
|
AP_post ::= AP_post SC ;
|
||||||
|
|
||||||
ComplAQ. AP ::= AQ "of" QS ;
|
-- replace this by NP ::= S
|
||||||
|
-- ComplAQ. AP_post ::= AQ "of" QS ;
|
||||||
|
|
||||||
---- TODO: comparison of AV etc
|
---- TODO: comparison of AV etc
|
||||||
|
|
||||||
|
|||||||
14
lib/resource/exper/Adjf.cf
Normal file
14
lib/resource/exper/Adjf.cf
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
PositA. AP ::= A ;
|
||||||
|
|
||||||
|
A ::= A2 | AV | A2V ;
|
||||||
|
-- also solves comparison of AV
|
||||||
|
|
||||||
|
ComparA. AP_post ::= "more" A "than" NP ;
|
||||||
|
AP_post ::= "less" A "than" NP ;
|
||||||
|
|
||||||
|
|
||||||
|
-- superlatives à la CLE
|
||||||
|
|
||||||
|
Num ::= "most" A ;
|
||||||
|
Num_Pl ::= "most" A ;
|
||||||
|
|
||||||
@@ -14,4 +14,5 @@ AdvAdv. Adv ::= AdA Adv ;
|
|||||||
|
|
||||||
VP ::= AdV VP ;
|
VP ::= AdV VP ;
|
||||||
|
|
||||||
|
OptAdV ::= | AdV ;
|
||||||
|
|
||||||
|
|||||||
19
lib/resource/exper/Adverbf.cf
Normal file
19
lib/resource/exper/Adverbf.cf
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
-- adverbs
|
||||||
|
|
||||||
|
AdjAdv. Adv ::= A "+ly" ;
|
||||||
|
AdvPP. Adv ::= PP ;
|
||||||
|
PrepNP. PP ::= Prep NP ;
|
||||||
|
|
||||||
|
-- NO AdvCN
|
||||||
|
--AdvVP. VP ::= VP Adv ;
|
||||||
|
--AdvNP. NP ::= NP Adv ;
|
||||||
|
AdvAP. AP ::= AdA AP ;
|
||||||
|
AdvAdv. Adv ::= AdA Adv ;
|
||||||
|
|
||||||
|
-- different from AdvVP!
|
||||||
|
|
||||||
|
--VP ::= AdV VP ;
|
||||||
|
|
||||||
|
OptAdV ::= | AdV ;
|
||||||
|
|
||||||
|
|
||||||
8386
lib/resource/exper/Biglex.cf
Normal file
8386
lib/resource/exper/Biglex.cf
Normal file
File diff suppressed because it is too large
Load Diff
10
lib/resource/exper/Coord.cf
Normal file
10
lib/resource/exper/Coord.cf
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
S ::= S Conj S ;
|
||||||
|
RS ::= RS Conj RS ;
|
||||||
|
NP ::= NP Conj NP ;
|
||||||
|
VP ::= VP Conj VP ;
|
||||||
|
IP ::= IP Conj IP ;
|
||||||
|
RP ::= RP Conj RP ;
|
||||||
|
Adv ::= Adv Conj Adv ;
|
||||||
|
IAdv ::= IAdv Conj IAdv ;
|
||||||
|
|
||||||
|
Adv ::= Subj S ;
|
||||||
@@ -13,9 +13,11 @@ PN ::= "John" ;
|
|||||||
A ::= "intelligent" ;
|
A ::= "intelligent" ;
|
||||||
A2 ::= "devoted" ;
|
A2 ::= "devoted" ;
|
||||||
AV ::= "tedious" ;
|
AV ::= "tedious" ;
|
||||||
AV ::= "difficult" ;
|
A2V ::= "difficult" ;
|
||||||
AS ::= "marvellous" ;
|
-- AS ::= "marvellous" ;
|
||||||
AQ ::= "independent" ;
|
A ::= "marvellous" ;
|
||||||
|
-- AQ ::= "independent" ;
|
||||||
|
A2 ::= "independent" ;
|
||||||
|
|
||||||
V0 ::= "rain" | "rains" ;
|
V0 ::= "rain" | "rains" ;
|
||||||
V ::= "sleeps" | "sleep" ;
|
V ::= "sleeps" | "sleep" ;
|
||||||
@@ -23,10 +25,13 @@ V2 ::= "loves" | "love" ;
|
|||||||
V3 ::= "sends" | "send" ;
|
V3 ::= "sends" | "send" ;
|
||||||
VV ::= "wants" | "want" ;
|
VV ::= "wants" | "want" ;
|
||||||
|
|
||||||
Adv ::= "here" ;
|
V2 ::= "says" | "say" ;
|
||||||
AdA ::= "very" ;
|
V2 ::= "asks" | "ask" ;
|
||||||
AdV ::= "always" ;
|
|
||||||
|
|
||||||
|
Adv ::= "here" | "there" ;
|
||||||
|
AdA ::= "very" | "too" | "quite" | "much" "too" ;
|
||||||
|
AdV ::= "always" | "almost" ;
|
||||||
|
AdN ::= "less" "than" | "more" "than" | "almost" | "exactly" | "about" ;
|
||||||
|
|
||||||
-- a bigger lexicon
|
-- a bigger lexicon
|
||||||
|
|
||||||
|
|||||||
@@ -25,8 +25,6 @@ Quant ::= ;
|
|||||||
---DetMass ::= Predet ;
|
---DetMass ::= Predet ;
|
||||||
---NMass ::= "wine" ;
|
---NMass ::= "wine" ;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
NP ::= Det_Pl CN_Pl ;
|
NP ::= Det_Pl CN_Pl ;
|
||||||
NP ::= Predet_Pl Quant_Pl Num_Pl ; -- nonempty det
|
NP ::= Predet_Pl Quant_Pl Num_Pl ; -- nonempty det
|
||||||
|
|
||||||
@@ -45,19 +43,23 @@ Num_Pl ::= Ordinal ;
|
|||||||
Num_Pl ::= Int ;
|
Num_Pl ::= Int ;
|
||||||
Num_Pl ::= Numeral ;
|
Num_Pl ::= Numeral ;
|
||||||
|
|
||||||
|
-- less than, exactly, almost,...
|
||||||
|
Numeral ::= AdN Numeral ;
|
||||||
|
|
||||||
CN_Pl ::= N_Pl ;
|
CN_Pl ::= N_Pl ;
|
||||||
CN ::= N ;
|
CN ::= N ;
|
||||||
|
|
||||||
-- prepositions cannot be expressed generally here
|
-- prepositions cannot be expressed generally here
|
||||||
-- NB relational nouns explain why complements are closer than adjuncts
|
-- NB relational nouns explain why complements are closer than adjuncts
|
||||||
|
-- But let us make the resource simpler by excluding them
|
||||||
CN ::= N2 Prep NP ;
|
-- CN ::= N2 Prep NP ;
|
||||||
N2 ::= N3 Prep NP ;
|
-- N2 ::= N3 Prep NP ;
|
||||||
|
|
||||||
-- elliptical constructions
|
-- elliptical constructions
|
||||||
|
-- with exclusion of rel nouns, they just help reuse the old lexicon
|
||||||
|
|
||||||
N2 ::= N3 ;
|
N2 ::= N3 ;
|
||||||
CN ::= N2 ;
|
N ::= N2 ;
|
||||||
|
|
||||||
-- these need other modules to produce anything
|
-- these need other modules to produce anything
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,11 @@
|
|||||||
Phr ::= PConj S ;
|
Phr ::= PConj S ;
|
||||||
|
Phr ::= PConj IP ;
|
||||||
|
Phr ::= PConj IAdv ;
|
||||||
|
|
||||||
Phr ::= PConj Imp Please ;
|
Phr ::= PConj Imp Please ;
|
||||||
Phr ::= PConj QS Please ;
|
Phr ::= PConj QS Please ;
|
||||||
Phr ::= PConj NP Please ;
|
Phr ::= PConj NP Please ;
|
||||||
Phr ::= PConj PP Please ;
|
Phr ::= PConj Adv Please ;
|
||||||
Phr ::= PConj "to" VP Please ;
|
Phr ::= PConj "to" VP Please ;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
-- include Noun.cf Adj.cf Verb.cf Sent.cf Adverb.cf Phrase.cf Numeral.cf Structural.cf Lex.cf
|
-- include Noun.cf Adj.cf Verb.cf Sent.cf Adverb.cf Phrase.cf Numeral.cf Structural.cf Lex.cf Biglex.cf Coord.cf
|
||||||
|
|
||||||
|
|||||||
2
lib/resource/exper/Rulesf.cf
Normal file
2
lib/resource/exper/Rulesf.cf
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
-- include Noun.cf Adjf.cf Verbf.cf Sentf.cf Adverbf.cf Phrase.cf Numeral.cf Structural.cf Lex.cf Biglex.cf Coord.cf
|
||||||
|
|
||||||
@@ -4,11 +4,27 @@ S ::= NP VP ;
|
|||||||
S ::= NP Mod VP ;
|
S ::= NP Mod VP ;
|
||||||
S ::= Adv "," S ;
|
S ::= Adv "," S ;
|
||||||
|
|
||||||
|
-- sentences used as subjects and objects
|
||||||
|
|
||||||
|
NP ::= SC ;
|
||||||
|
|
||||||
|
SC ::= "that" S ;
|
||||||
|
SC ::= "to" VP ;
|
||||||
|
SC ::= QS ;
|
||||||
|
|
||||||
|
-- this is not needed in gf
|
||||||
|
SC ::= "whether" S | "if" S ;
|
||||||
|
|
||||||
|
-- existentials
|
||||||
|
|
||||||
|
S ::= "there" Cop NP ;
|
||||||
|
QS ::= Cop "there" NP ;
|
||||||
|
|
||||||
-- slash category instead of gaps
|
-- slash category instead of gaps
|
||||||
|
|
||||||
Slash ::= NP V2 ;
|
Slash ::= NP OptAdV V2 ;
|
||||||
Slash ::= NP VV "to" V2 ;
|
Slash ::= NP OptAdV VV "to" V2 ;
|
||||||
Slash ::= NP Cop A2 Prep ;
|
Slash ::= NP Cop OptAdV A2 Prep ;
|
||||||
Slash ::= S Prep ;
|
Slash ::= S Prep ;
|
||||||
Slash ::= Slash Adv ; -- who does my son love here
|
Slash ::= Slash Adv ; -- who does my son love here
|
||||||
|
|
||||||
@@ -21,7 +37,9 @@ QS ::= Cop NP Comp ;
|
|||||||
|
|
||||||
IntVP. QS ::= IP VP ;
|
IntVP. QS ::= IP VP ;
|
||||||
QS ::= IP Mod VP ;
|
QS ::= IP Mod VP ;
|
||||||
IntSlash. QS ::= IP Mod Slash ;
|
IntSlash. QS ::= IP Mod QSlash ;
|
||||||
|
|
||||||
|
QSlash ::= Slash | QS Prep ;
|
||||||
|
|
||||||
-- general: QuestAdv : IAdv -> Cl -> QCl ;
|
-- general: QuestAdv : IAdv -> Cl -> QCl ;
|
||||||
QS ::= IAdv Mod NP VP ;
|
QS ::= IAdv Mod NP VP ;
|
||||||
@@ -39,13 +57,13 @@ RS ::= Slash ;
|
|||||||
-- CLE syntax of relatives
|
-- CLE syntax of relatives
|
||||||
NP ::= NP RS ;
|
NP ::= NP RS ;
|
||||||
|
|
||||||
FunIP. IP ::= "the" N2 Prep IP ;
|
FunIP. IP ::= NP Prep IP ; --N2
|
||||||
|
|
||||||
IP ::= IDet OptNum CN ;
|
IP ::= IDet OptNum CN ;
|
||||||
IP ::= IDet OptNum_Pl CN_Pl ;
|
IP ::= IDet OptNum_Pl CN_Pl ;
|
||||||
IP ::= IP PP ;
|
IP ::= IP PP ;
|
||||||
|
|
||||||
FunRP. RP ::= "the" N2 Prep RP ; -- ?
|
FunRP. RP ::= NP Prep RP ; -- ?
|
||||||
RP ::= "whose" OptNum CN ;
|
RP ::= "whose" OptNum CN ;
|
||||||
RP ::= "whose" OptNum_Pl CN_Pl ;
|
RP ::= "whose" OptNum_Pl CN_Pl ;
|
||||||
|
|
||||||
|
|||||||
70
lib/resource/exper/Sentf.cf
Normal file
70
lib/resource/exper/Sentf.cf
Normal file
@@ -0,0 +1,70 @@
|
|||||||
|
-- flat structure for S and VP; use instead of Sent.cf
|
||||||
|
|
||||||
|
--- just one tense considered; no agreement forced
|
||||||
|
|
||||||
|
S ::= NP VP ;
|
||||||
|
S ::= NP Mod VP ;
|
||||||
|
S ::= Adv "," S ;
|
||||||
|
|
||||||
|
-- sentences used as subjects and objects
|
||||||
|
|
||||||
|
NP ::= SC ;
|
||||||
|
|
||||||
|
SC ::= "that" S ;
|
||||||
|
SC ::= "to" VP ;
|
||||||
|
SC ::= QS ;
|
||||||
|
|
||||||
|
-- this is not needed in gf
|
||||||
|
SC ::= "whether" S | "if" S ;
|
||||||
|
|
||||||
|
-- existentials
|
||||||
|
|
||||||
|
S ::= "there" Cop NP ;
|
||||||
|
QS ::= Cop "there" NP ;
|
||||||
|
|
||||||
|
-- slash category instead of gaps
|
||||||
|
|
||||||
|
Slash ::= S Prep ;
|
||||||
|
Slash ::= Slash Adv ; -- who does my son love here
|
||||||
|
|
||||||
|
-- questions
|
||||||
|
|
||||||
|
QS ::= Mod NP VP ;
|
||||||
|
|
||||||
|
-- this will be eliminated via richer lintypes
|
||||||
|
QS ::= Cop NP Comp ;
|
||||||
|
|
||||||
|
IntVP. QS ::= IP VP ;
|
||||||
|
QS ::= IP Mod VP ;
|
||||||
|
IntSlash. QS ::= IP Mod Slash ;
|
||||||
|
|
||||||
|
-- general: QuestAdv : IAdv -> Cl -> QCl ;
|
||||||
|
QS ::= IAdv Mod NP VP ;
|
||||||
|
QS ::= IAdv Cop NP ;
|
||||||
|
|
||||||
|
IAdv ::= Prep IP ;
|
||||||
|
|
||||||
|
-- relatives
|
||||||
|
|
||||||
|
RelVP. RS ::= RP VP ;
|
||||||
|
RS ::= RP Mod VP ;
|
||||||
|
RelSlash. RS ::= RP Slash ;
|
||||||
|
RS ::= Slash ;
|
||||||
|
|
||||||
|
-- CLE syntax of relatives
|
||||||
|
NP ::= NP RS ;
|
||||||
|
|
||||||
|
FunIP. IP ::= "the" N2 Prep IP ;
|
||||||
|
|
||||||
|
IP ::= IDet OptNum CN ;
|
||||||
|
IP ::= IDet OptNum_Pl CN_Pl ;
|
||||||
|
IP ::= IP PP ;
|
||||||
|
|
||||||
|
FunRP. RP ::= "the" N2 Prep RP ; -- ?
|
||||||
|
RP ::= "whose" OptNum CN ;
|
||||||
|
RP ::= "whose" OptNum_Pl CN_Pl ;
|
||||||
|
|
||||||
|
-- imperative
|
||||||
|
|
||||||
|
PosImpVP. Imp ::= VP ;
|
||||||
|
NegImpVP. Imp ::= "don't" VP ;
|
||||||
@@ -2,21 +2,21 @@
|
|||||||
|
|
||||||
Predet ::= "only" | "just" ;
|
Predet ::= "only" | "just" ;
|
||||||
|
|
||||||
Quant ::= "this" | "that" | "the" | "a" | "every" | "some" ;
|
Quant ::= "this" | "that" | "the" | "a" | "an" | "every" | "some" ;
|
||||||
|
|
||||||
Predet_Pl ::= "all" | "only" | "just" | "most" "of" ;
|
Predet_Pl ::= "all" | "only" | "just" | "most" "of" ;
|
||||||
|
|
||||||
Quant_Pl ::= "these" | "those" | "the" | "many" | "some" ;
|
Quant_Pl ::= "these" | "those" | "the" | "many" | "some" ;
|
||||||
|
|
||||||
Pron ::= "I" | "you" | "he" | "she" | "we" | "they" ;
|
Pron ::= "I" | "you" | "he" | "she" | "we" | "they" | "it" ;
|
||||||
Pron ::= "me" | "him" | "her" | "us" | "them" ;
|
Pron ::= "me" | "him" | "her" | "us" | "them" ;
|
||||||
Poss ::= "my" | "your" | "his" | "her" | "our" | "their" ;
|
Poss ::= "my" | "your" | "his" | "her" | "our" | "their" | "its" ;
|
||||||
|
|
||||||
Prep ::= "about" | "at" | "by" | "for" | "from" | "in" | "on" | "to" | "with" ;
|
Prep ::= "about" | "at" | "by" | "for" | "from" | "in" | "of" | "on" | "to" | "with" ;
|
||||||
|
|
||||||
IAdv ::= "why" | "where" | "when" | "how" ;
|
IAdv ::= "why" | "where" | "when" | "how" ;
|
||||||
|
|
||||||
IP ::= "who" | "what" ;
|
IP ::= "who" | "whom" | "what" ;
|
||||||
|
|
||||||
IDet ::= "which" | "how" "many" | "whose" ;
|
IDet ::= "which" | "how" "many" | "whose" ;
|
||||||
|
|
||||||
@@ -24,6 +24,12 @@ RP ::= "which" | "who" | "that" | "whom" ;
|
|||||||
|
|
||||||
PConj ::= | "and" | "but" | "therefore" ;
|
PConj ::= | "and" | "but" | "therefore" ;
|
||||||
|
|
||||||
|
NP ::= "this" | "that" | "those" | "these" ;
|
||||||
|
|
||||||
|
Conj ::= "and" | "or" ;
|
||||||
|
|
||||||
|
Subj ::= "if" | "when" | "although" | "though" ;
|
||||||
|
|
||||||
-- these may be eliminated in gf
|
-- these may be eliminated in gf
|
||||||
|
|
||||||
Cop ::= "is" | "are" | "isn't" | "aren't" | "be" | "am" | "am" "not" ;
|
Cop ::= "is" | "are" | "isn't" | "aren't" | "be" | "am" | "am" "not" ;
|
||||||
|
|||||||
@@ -1,10 +1,15 @@
|
|||||||
|
|
||||||
PredV0. S ::= "it" V0 ;
|
-- PredV0. S ::= "it" V0 ;
|
||||||
|
V ::= V0 ;
|
||||||
|
|
||||||
UseV. VP ::= V ;
|
UseV. VP ::= V ;
|
||||||
ComplV2. VP ::= V2 NP ;
|
ComplV2. VP ::= V2 NP ;
|
||||||
ComplV3. VP ::= V3 NP NP ;
|
|
||||||
ComplVV. VP ::= VV "to" VP ;
|
-- ComplV3. VP ::= V3 NP NP ;
|
||||||
|
V2 ::= V3 ; -- via pp's
|
||||||
|
|
||||||
|
-- ComplVV. VP ::= VV "to" VP ;
|
||||||
|
V2 ::= VV ; -- I want (a house | to swim)
|
||||||
|
|
||||||
VP ::= Cop Comp ;
|
VP ::= Cop Comp ;
|
||||||
|
|
||||||
|
|||||||
15
lib/resource/exper/Verbf.cf
Normal file
15
lib/resource/exper/Verbf.cf
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
-- flat structure for verbs; use instead of Verb.cf ?
|
||||||
|
|
||||||
|
V ::= V0 | V2 | V3 | VV ;
|
||||||
|
|
||||||
|
UseV. VP ::= OptAdV V ;
|
||||||
|
VP ::= Cop OptAdV Comp ;
|
||||||
|
|
||||||
|
VP ::= VP NP ;
|
||||||
|
VP ::= VP Adv ;
|
||||||
|
|
||||||
|
Comp ::= AP | NP | Adv ;
|
||||||
|
Comp ::= AP_post ; -- not needed in gf
|
||||||
|
|
||||||
|
Mod ::= Do ;
|
||||||
|
|
||||||
Reference in New Issue
Block a user