mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-01 23:32:51 -06:00
ordinals
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
PositA. AP ::= A ;
|
||||
ComplA2. AP_post ::= A2 Prep NP ;
|
||||
ComparA. AP_post ::= "more" A "than" NP ;
|
||||
AP_post ::= "less" A "than" NP ;
|
||||
|
||||
-- superlatives à la CLE
|
||||
|
||||
@@ -10,17 +11,9 @@ Num_Pl ::= "most" A ;
|
||||
ComplAV. AP_post ::= AV Prep VP ;
|
||||
UseA2V. AV ::= A2V Prep NP ;
|
||||
|
||||
PredAS. Cl ::= "it" "be" AS "that" S ;
|
||||
PredAS. Cl ::= "it" Cop AS "that" S ;
|
||||
|
||||
ComplAQ. AP ::= AQ "of" QS ;
|
||||
|
||||
---- TODO: comparison of AV etc
|
||||
|
||||
-- lexicon
|
||||
|
||||
A ::= "intelligent" ;
|
||||
A2 ::= "devoted" ;
|
||||
AV ::= "tedious" ;
|
||||
AV ::= "difficult" ;
|
||||
AS ::= "marvellous" ;
|
||||
AQ ::= "independent" ;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
AdjAdv. Adv ::= A "+ly" ;
|
||||
AdvPP. Adv ::= PP ;
|
||||
PrepNP. Adv ::= Prep NP ;
|
||||
PrepNP. PP ::= Prep NP ;
|
||||
|
||||
-- NO AdvCN
|
||||
AdvVP. VP ::= VP Adv ;
|
||||
@@ -14,9 +14,4 @@ AdvAdv. Adv ::= AdA Adv ;
|
||||
|
||||
VP ::= AdV VP ;
|
||||
|
||||
-- lexicon
|
||||
|
||||
Prep ::= "of" | "to" ;
|
||||
Adv ::= "here" ;
|
||||
AdA ::= "very" ;
|
||||
AdV ::= "always" ;
|
||||
|
||||
@@ -1,9 +1,36 @@
|
||||
-- a bigger lexicon
|
||||
-- some open lexicon
|
||||
|
||||
Pron ::= "I" | "me" | "he" | "she" ;
|
||||
Pron ::= "us" | "we" ;
|
||||
Poss ::= "your" | "his" | "her" | "our" ;
|
||||
Prep ::= "about" | "for" | "from" | "in" ;
|
||||
N_Pl ::= "sons" ;
|
||||
N ::= "son" ;
|
||||
|
||||
N ::= "wine" ;
|
||||
|
||||
N2 ::= "plan" ;
|
||||
N3 ::= "value" ;
|
||||
|
||||
PN ::= "John" ;
|
||||
|
||||
A ::= "intelligent" ;
|
||||
A2 ::= "devoted" ;
|
||||
AV ::= "tedious" ;
|
||||
AV ::= "difficult" ;
|
||||
AS ::= "marvellous" ;
|
||||
AQ ::= "independent" ;
|
||||
|
||||
V0 ::= "rain" | "rains" ;
|
||||
V ::= "sleeps" | "sleep" ;
|
||||
V2 ::= "loves" | "love" ;
|
||||
V3 ::= "sends" | "send" ;
|
||||
VV ::= "wants" | "want" ;
|
||||
|
||||
Adv ::= "here" ;
|
||||
AdA ::= "very" ;
|
||||
AdV ::= "always" ;
|
||||
|
||||
|
||||
-- a bigger lexicon
|
||||
|
||||
N ::= "car" | "house" | "flight" | "aircraft" ;
|
||||
N_Pl ::= "cars" | "houses" | "flights" | "aircraft" ;
|
||||
|
||||
PN ::= "Boston" | "New" "York" | "Baltimore" ;
|
||||
|
||||
@@ -1,45 +1,49 @@
|
||||
NP ::= Det CN ;
|
||||
NP ::= PN ;
|
||||
NP ::= Pron ;
|
||||
Det ::= Predet Quant Num ;
|
||||
Det ::= Predet Quant ;
|
||||
NP ::= Predet Quant Num ;
|
||||
Det ::= Predet Quant OptNum ;
|
||||
|
||||
Predet ::= ;
|
||||
|
||||
Predet ::= "only" | "just" ;
|
||||
Quant ::= "this" | "the" | "a" | "every" | "some" ;
|
||||
|
||||
Num ::= "one" ;
|
||||
-- examples
|
||||
-- Predet ::= "only" | "just" ;
|
||||
-- Quant ::= "this" | "the" | "a" | "every" | "some" ;
|
||||
-- Num ::= "one" ;
|
||||
|
||||
Quant ::= Poss ;
|
||||
|
||||
Quant ::= ; -- for NMass
|
||||
OptNum ::= | Num ;
|
||||
|
||||
Num ::= Ordinal ;
|
||||
|
||||
-- instead of NMass
|
||||
Quant ::= ;
|
||||
|
||||
---NP ::= DetMass NMass ;
|
||||
---DetMass ::= Predet Quant ;
|
||||
---DetMass ::= Predet ;
|
||||
---NMass ::= "wine" ;
|
||||
Pron ::= "you" ;
|
||||
|
||||
|
||||
|
||||
NP ::= Det_Pl CN_Pl ;
|
||||
NP ::= Predet_Pl Quant_Pl Num_Pl ; -- nonempty det
|
||||
|
||||
Det_Pl ::= Predet_Pl Quant_Pl Num_Pl ;
|
||||
Det_Pl ::= Predet_Pl Quant_Pl ;
|
||||
Det_Pl ::= Predet_Pl Quant_Pl OptNum_Pl ;
|
||||
|
||||
Predet_Pl ::= ;
|
||||
Quant_Pl ::= ;
|
||||
|
||||
Predet_Pl ::= "all" | "only" | "just" ;
|
||||
|
||||
Quant_Pl ::= "these" | "many" | "some" ;
|
||||
|
||||
Quant_Pl ::= Poss ;
|
||||
|
||||
Poss ::= NP "'s" | "my" ;
|
||||
Poss ::= NP "'s" ; -- also "my" ;
|
||||
|
||||
OptNum_Pl ::= | Num_Pl ;
|
||||
|
||||
Num_Pl ::= Ordinal ;
|
||||
Num_Pl ::= Int ;
|
||||
Num_Pl ::= "four" ;
|
||||
Num_Pl ::= Numeral ;
|
||||
|
||||
CN_Pl ::= N_Pl ;
|
||||
CN ::= N ;
|
||||
@@ -47,8 +51,8 @@ CN ::= N ;
|
||||
-- prepositions cannot be expressed generally here
|
||||
-- NB relational nouns explain why complements are closer than adjuncts
|
||||
|
||||
CN ::= N2 "for" NP ;
|
||||
N2 ::= N3 "of" NP ;
|
||||
CN ::= N2 Prep NP ;
|
||||
N2 ::= N3 Prep NP ;
|
||||
|
||||
-- elliptical constructions
|
||||
|
||||
@@ -64,15 +68,3 @@ CN ::= CN "that" S ;
|
||||
CN_Pl ::= AP CN_Pl ;
|
||||
CN_Pl ::= CN_Pl AP_post ;
|
||||
|
||||
-- some open lexicon
|
||||
|
||||
N_Pl ::= "sons" ;
|
||||
N ::= "son" ;
|
||||
|
||||
N2 ::= "plan" ;
|
||||
N3 ::= "value" ;
|
||||
|
||||
N ::= "wine" ;
|
||||
|
||||
PN ::= "John" ;
|
||||
|
||||
|
||||
77
lib/resource/exper/Numeral.cf
Normal file
77
lib/resource/exper/Numeral.cf
Normal file
@@ -0,0 +1,77 @@
|
||||
-- overgenerating from NumeralsEng
|
||||
|
||||
Ordinal ::= DigitO | Numeral DigitO ;
|
||||
|
||||
-- usable in Sg
|
||||
Num ::= "one" ;
|
||||
|
||||
pot2as3. Sub1000000 ::= Sub1000 ;
|
||||
pot3. Sub1000000 ::= Sub1000 "thousand" ;
|
||||
pot3plus. Sub1000000 ::= Sub1000 "thousand" Sub1000 ;
|
||||
pot1as2. Sub1000 ::= Sub100 ;
|
||||
pot2. Sub1000 ::= Sub10 "hundred" ;
|
||||
pot2plus. Sub1000 ::= Sub10 "hundred" "and" Sub100 ;
|
||||
pot0as1. Sub100 ::= Sub10 ;
|
||||
pot1. Sub100 ::= Digit ;
|
||||
pot110. Sub100 ::= "ten" ;
|
||||
pot111. Sub100 ::= "eleven" ;
|
||||
pot1plus. Sub100 ::= Digit "-" Sub10 ;
|
||||
pot1to19. Sub100 ::= Digit ;
|
||||
pot0. Sub10 ::= Digit ;
|
||||
pot01. Sub10 ::= "one" ;
|
||||
num. Numeral ::= Sub1000000 ;
|
||||
n2a. Digit ::= "twelve" ;
|
||||
n2b. Digit ::= "twenty" ;
|
||||
n2c. Digit ::= "two" ;
|
||||
n3a. Digit ::= "thirteen" ;
|
||||
n3b. Digit ::= "thirty" ;
|
||||
n3c. Digit ::= "three" ;
|
||||
n4a. Digit ::= "forty" ;
|
||||
n4b. Digit ::= "four" ;
|
||||
n4c. Digit ::= "fourteen" ;
|
||||
n5a. Digit ::= "fifteen" ;
|
||||
n5b. Digit ::= "fifty" ;
|
||||
n5c. Digit ::= "five" ;
|
||||
n6a. Digit ::= "six" ;
|
||||
n6b. Digit ::= "sixteen" ;
|
||||
n6c. Digit ::= "sixty" ;
|
||||
n7a. Digit ::= "seven" ;
|
||||
n7b. Digit ::= "seventeen" ;
|
||||
n7c. Digit ::= "seventy" ;
|
||||
n8a. Digit ::= "eight" ;
|
||||
n8b. Digit ::= "eighteen" ;
|
||||
n8c. Digit ::= "eighty" ;
|
||||
n9a. Digit ::= "nine" ;
|
||||
n9b. Digit ::= "nineteen" ;
|
||||
n9c. Digit ::= "ninety" ;
|
||||
|
||||
n1d. DigitO ::= "first" ;
|
||||
n1e. DigitO ::= "elevent" ;
|
||||
n1f. DigitO ::= "tenth" ;
|
||||
n1g. DigitO ::= "hundredth" ;
|
||||
n1h. DigitO ::= "thousandth" ;
|
||||
|
||||
n2d. DigitO ::= "second" ;
|
||||
n2e. DigitO ::= "twelfth" ;
|
||||
n2f. DigitO ::= "twentieth" ;
|
||||
n3d. DigitO ::= "thirteenth" ;
|
||||
n3e. DigitO ::= "third" ;
|
||||
n3f. DigitO ::= "thirtieth" ;
|
||||
n4d. DigitO ::= "fourth" ;
|
||||
n4e. DigitO ::= "fourteenth" ;
|
||||
n4f. DigitO ::= "fortieth" ;
|
||||
n5d. DigitO ::= "fifteenth" ;
|
||||
n5e. DigitO ::= "fifth" ;
|
||||
n5f. DigitO ::= "fiftieth" ;
|
||||
n6d. DigitO ::= "sixth" ;
|
||||
n6e. DigitO ::= "sixteenth" ;
|
||||
n6f. DigitO ::= "sixtieth" ;
|
||||
n7d. DigitO ::= "seventh" ;
|
||||
n7e. DigitO ::= "seventeenth" ;
|
||||
n7f. DigitO ::= "seventieth" ;
|
||||
n8d. DigitO ::= "eighth" ;
|
||||
n8e. DigitO ::= "eighteenth" ;
|
||||
n8f. DigitO ::= "eightieth" ;
|
||||
n9d. DigitO ::= "nineth" ;
|
||||
n9e. DigitO ::= "nineteenth" ;
|
||||
n9f. DigitO ::= "ninetieth" ;
|
||||
@@ -1,8 +1,10 @@
|
||||
Phr ::= PConj Imp ;
|
||||
Phr ::= PConj S ;
|
||||
Phr ::= PConj QS ;
|
||||
|
||||
Phr ::= PConj "please" Imp | PConj QS "please" ;
|
||||
Phr ::= PConj NP | PConj NP "please" ;
|
||||
Phr ::= PConj Imp Please ;
|
||||
Phr ::= PConj QS Please ;
|
||||
Phr ::= PConj NP Please ;
|
||||
Phr ::= PConj PP Please ;
|
||||
Phr ::= PConj "to" VP Please ;
|
||||
|
||||
PConj ::= | "and" | "but" | "therefore" ;
|
||||
|
||||
Please ::= | "please" ;
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
-- include Det.cf Adj.cf Verb.cf Sent.cf Adverb.cf Phrase.cf Lex.cf
|
||||
-- include Noun.cf Adj.cf Verb.cf Sent.cf Adverb.cf Phrase.cf Numeral.cf Structural.cf Lex.cf
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
--- just one tense considered; no agreement forced
|
||||
|
||||
S ::= NP Do VP ;
|
||||
S ::= NP VP ;
|
||||
S ::= NP Mod VP ;
|
||||
S ::= Adv "," S ;
|
||||
|
||||
-- slash category instead of gaps
|
||||
@@ -13,35 +14,40 @@ Slash ::= Slash Adv ; -- who does my son love here
|
||||
|
||||
-- questions
|
||||
|
||||
QS ::= Do NP VP ;
|
||||
QS ::= Mod NP VP ;
|
||||
|
||||
-- this will be eliminated via richer lintypes
|
||||
QS ::= Cop NP Comp ;
|
||||
|
||||
IntVP. QS ::= IP VP ;
|
||||
QS ::= IP Do VP ;
|
||||
IntSlash. QS ::= IP Do Slash ;
|
||||
QS ::= IP Mod VP ;
|
||||
IntSlash. QS ::= IP Mod Slash ;
|
||||
|
||||
-- general: QuestAdv : IAdv -> Cl -> QCl ;
|
||||
QS ::= IAdv Do NP VP ;
|
||||
QS ::= IAdv Mod NP VP ;
|
||||
QS ::= IAdv Cop NP ;
|
||||
|
||||
IAdv ::= "why" | "where" | "when" ;
|
||||
IAdv ::= Prep IP ;
|
||||
|
||||
-- relatives
|
||||
|
||||
RelVP. RS ::= RP VP ;
|
||||
RS ::= RP "doesn't" VP ;
|
||||
RS ::= RP Mod VP ;
|
||||
RelSlash. RS ::= RP Slash ;
|
||||
RS ::= Slash ;
|
||||
|
||||
-- CLE syntax of relatives
|
||||
NP ::= NP RS ;
|
||||
|
||||
IP ::= "who" ;
|
||||
FunIP. IP ::= "the" N2 "of" IP ;
|
||||
FunIP. IP ::= "the" N2 Prep IP ;
|
||||
|
||||
RP ::= "which" ;
|
||||
FunRP. RP ::= "the" N2 "of" RP ; -- ?
|
||||
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
|
||||
|
||||
|
||||
31
lib/resource/exper/Structural.cf
Normal file
31
lib/resource/exper/Structural.cf
Normal file
@@ -0,0 +1,31 @@
|
||||
-- structural words
|
||||
|
||||
Predet ::= "only" | "just" ;
|
||||
|
||||
Quant ::= "this" | "that" | "the" | "a" | "every" | "some" ;
|
||||
|
||||
Predet_Pl ::= "all" | "only" | "just" | "most" "of" ;
|
||||
|
||||
Quant_Pl ::= "these" | "those" | "the" | "many" | "some" ;
|
||||
|
||||
Pron ::= "I" | "you" | "he" | "she" | "we" | "they" ;
|
||||
Pron ::= "me" | "him" | "her" | "us" | "them" ;
|
||||
Poss ::= "my" | "your" | "his" | "her" | "our" | "their" ;
|
||||
|
||||
Prep ::= "about" | "at" | "by" | "for" | "from" | "in" | "on" | "to" | "with" ;
|
||||
|
||||
IAdv ::= "why" | "where" | "when" | "how" ;
|
||||
|
||||
IP ::= "who" | "what" ;
|
||||
|
||||
IDet ::= "which" | "how" "many" | "whose" ;
|
||||
|
||||
RP ::= "which" | "who" | "that" | "whom" ;
|
||||
|
||||
PConj ::= | "and" | "but" | "therefore" ;
|
||||
|
||||
-- these may be eliminated in gf
|
||||
|
||||
Cop ::= "is" | "are" | "isn't" | "aren't" | "be" | "am" | "am" "not" ;
|
||||
Do ::= "do" | "does" | "doesn't" | "don't" ;
|
||||
Mod ::= "can" | "can't" | "would" | "wouldn't" | "will" | "won't" ;
|
||||
@@ -9,20 +9,8 @@ ComplVV. VP ::= VV "to" VP ;
|
||||
VP ::= Cop Comp ;
|
||||
|
||||
Comp ::= AP | NP | Adv ;
|
||||
Comp ::= AP_post ; -- not needed in gf
|
||||
|
||||
Mod ::= Do ;
|
||||
|
||||
-- partial saturation
|
||||
|
||||
|
||||
|
||||
-- in the lexicon, we must give up verb agreement
|
||||
|
||||
V0 ::= "rain" | "rains" ;
|
||||
V ::= "sleeps" | "sleep" ;
|
||||
V2 ::= "loves" | "love" ;
|
||||
V3 ::= "sends" | "send" ;
|
||||
VV ::= "wants" | "want" ;
|
||||
|
||||
-- these may be eliminated
|
||||
|
||||
Cop ::= "is" | "are" | "isn't" | "aren't" | "be" ;
|
||||
Do ::= "do" | "does" | "doesn't" | "don't" ;
|
||||
|
||||
Reference in New Issue
Block a user