forked from GitHub/gf-rgl
simple problem tracing
This commit is contained in:
21
resource-1.0/exper/Adj.cf
Normal file
21
resource-1.0/exper/Adj.cf
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
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
|
||||||
|
|
||||||
|
Num ::= "most" A ;
|
||||||
|
Num_Pl ::= "most" A ;
|
||||||
|
|
||||||
|
ComplAV. AP_post ::= AV "to" VP ;
|
||||||
|
UseA2V. AV ::= A2V Prep NP ;
|
||||||
|
|
||||||
|
-- is this much too general?
|
||||||
|
SentAP. AP_post ::= AP SC ;
|
||||||
|
AP_post ::= AP_post SC ;
|
||||||
|
|
||||||
|
-- replace this by NP ::= S
|
||||||
|
-- ComplAQ. AP_post ::= AQ "of" QS ;
|
||||||
|
|
||||||
|
---- TODO: comparison of AV etc
|
||||||
14
resource-1.0/exper/Adjf.cf
Normal file
14
resource-1.0/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 ;
|
||||||
|
|
||||||
18
resource-1.0/exper/Adverb.cf
Normal file
18
resource-1.0/exper/Adverb.cf
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
-- 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 ;
|
||||||
|
|
||||||
19
resource-1.0/exper/Adverbf.cf
Normal file
19
resource-1.0/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 ;
|
||||||
|
|
||||||
|
|
||||||
8359
resource-1.0/exper/Biglex.cf
Normal file
8359
resource-1.0/exper/Biglex.cf
Normal file
File diff suppressed because it is too large
Load Diff
10
resource-1.0/exper/Coord.cf
Normal file
10
resource-1.0/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 ;
|
||||||
1
resource-1.0/exper/Irreg.cf
Normal file
1
resource-1.0/exper/Irreg.cf
Normal file
File diff suppressed because one or more lines are too long
42
resource-1.0/exper/Lex.cf
Normal file
42
resource-1.0/exper/Lex.cf
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
-- some open lexicon
|
||||||
|
|
||||||
|
N_Pl ::= "sons" ;
|
||||||
|
N ::= "son" ;
|
||||||
|
|
||||||
|
N ::= "wine" ;
|
||||||
|
|
||||||
|
N2 ::= "plan" ;
|
||||||
|
N3 ::= "value" ;
|
||||||
|
|
||||||
|
PN ::= "John" ;
|
||||||
|
|
||||||
|
A ::= "intelligent" ;
|
||||||
|
A2 ::= "devoted" ;
|
||||||
|
AV ::= "tedious" ;
|
||||||
|
A2V ::= "difficult" ;
|
||||||
|
-- AS ::= "marvellous" ;
|
||||||
|
A ::= "marvellous" ;
|
||||||
|
-- AQ ::= "independent" ;
|
||||||
|
A2 ::= "independent" ;
|
||||||
|
|
||||||
|
V0 ::= "rain" | "rains" | "rained" ;
|
||||||
|
V ::= "sleeps" | "sleep" | "slept" ;
|
||||||
|
V2 ::= "loves" | "love" | "loved" ;
|
||||||
|
V3 ::= "sends" | "send" | "sent" ;
|
||||||
|
VV ::= "wants" | "want" | "wanted" ;
|
||||||
|
|
||||||
|
V2 ::= "says" | "say" | "said" ;
|
||||||
|
V2 ::= "asks" | "ask" | "asked" ;
|
||||||
|
|
||||||
|
Adv ::= "here" | "there" ;
|
||||||
|
Adv ::= "from" "here" | "from" "there" ;
|
||||||
|
Adv ::= "today" | "tomorrow" | "yesterday" ;
|
||||||
|
AdA ::= "very" | "too" | "quite" | "much" "too" ;
|
||||||
|
AdV ::= "always" | "almost" | "just" ;
|
||||||
|
AdN ::= "less" "than" | "more" "than" | "almost" | "exactly" | "about" ;
|
||||||
|
|
||||||
|
|
||||||
|
--- does this give too much?
|
||||||
|
Adv ::= "last" N | "next" N ;
|
||||||
|
|
||||||
|
PN ::= "Boston" | "New" "York" | "Baltimore" ;
|
||||||
22
resource-1.0/exper/MkLex.hs
Normal file
22
resource-1.0/exper/MkLex.hs
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
mkEd file = do
|
||||||
|
let out = "new.tmp"
|
||||||
|
writeFile out ""
|
||||||
|
ss <- readFile file >>= return . lines
|
||||||
|
mapM_ (\s -> appendFile out (addIng s) >> appendFile out "\n") ss
|
||||||
|
|
||||||
|
addEd line = case words line of
|
||||||
|
c@('V':_):ar:p:b:v:sc:_ -> unwords $ [c,ar,p,b,v,b,past (init v) ++ "\"",sc]
|
||||||
|
_ -> line
|
||||||
|
where
|
||||||
|
past v = case last v of
|
||||||
|
'e' -> v ++ "d"
|
||||||
|
'y' -> init v ++ "ied"
|
||||||
|
_ -> v ++ "ed"
|
||||||
|
|
||||||
|
addIng line = case words line of
|
||||||
|
c@('V':_):ar:p:b:v:_:ed:sc:_ -> unwords $ [c,ar,p,b,v,b,ed,b,ing (init v) ++ "\"",sc]
|
||||||
|
_ -> line
|
||||||
|
where
|
||||||
|
ing v = case last v of
|
||||||
|
'e' -> init v ++ "ing"
|
||||||
|
_ -> v ++ "ing"
|
||||||
72
resource-1.0/exper/Noun.cf
Normal file
72
resource-1.0/exper/Noun.cf
Normal file
@@ -0,0 +1,72 @@
|
|||||||
|
NP ::= Det CN ;
|
||||||
|
NP ::= PN ;
|
||||||
|
NP ::= Pron ;
|
||||||
|
NP ::= Predet Quant Num ;
|
||||||
|
Det ::= Predet Quant OptNum ;
|
||||||
|
|
||||||
|
Predet ::= ;
|
||||||
|
|
||||||
|
-- examples
|
||||||
|
-- Predet ::= "only" | "just" ;
|
||||||
|
-- Quant ::= "this" | "the" | "a" | "every" | "some" ;
|
||||||
|
-- Num ::= "one" ;
|
||||||
|
|
||||||
|
Quant ::= Poss ;
|
||||||
|
|
||||||
|
OptNum ::= | Num ;
|
||||||
|
|
||||||
|
Num ::= Ordinal ;
|
||||||
|
|
||||||
|
-- instead of NMass
|
||||||
|
Quant ::= ;
|
||||||
|
|
||||||
|
---NP ::= DetMass NMass ;
|
||||||
|
---DetMass ::= Predet Quant ;
|
||||||
|
---DetMass ::= Predet ;
|
||||||
|
---NMass ::= "wine" ;
|
||||||
|
|
||||||
|
NP ::= Det_Pl CN_Pl ;
|
||||||
|
NP ::= Predet_Pl Quant_Pl Num_Pl ; -- nonempty det
|
||||||
|
|
||||||
|
Det_Pl ::= Predet_Pl Quant_Pl OptNum_Pl ;
|
||||||
|
|
||||||
|
Predet_Pl ::= ;
|
||||||
|
Quant_Pl ::= ;
|
||||||
|
|
||||||
|
Quant_Pl ::= Poss ;
|
||||||
|
|
||||||
|
Poss ::= NP "'s" ; -- also "my" ;
|
||||||
|
|
||||||
|
OptNum_Pl ::= | Num_Pl ;
|
||||||
|
|
||||||
|
Num_Pl ::= Ordinal ;
|
||||||
|
Num_Pl ::= Int ;
|
||||||
|
Num_Pl ::= Numeral ;
|
||||||
|
|
||||||
|
-- less than, exactly, almost,...
|
||||||
|
Numeral ::= AdN Numeral ;
|
||||||
|
|
||||||
|
CN_Pl ::= N_Pl ;
|
||||||
|
CN ::= N ;
|
||||||
|
|
||||||
|
-- prepositions cannot be expressed generally here
|
||||||
|
-- NB relational nouns explain why complements are closer than adjuncts
|
||||||
|
-- But let us make the resource simpler by excluding them
|
||||||
|
-- CN ::= N2 Prep NP ;
|
||||||
|
-- N2 ::= N3 Prep NP ;
|
||||||
|
|
||||||
|
-- elliptical constructions
|
||||||
|
-- with exclusion of rel nouns, they just help reuse the old lexicon
|
||||||
|
|
||||||
|
N2 ::= N3 ;
|
||||||
|
N ::= N2 ;
|
||||||
|
|
||||||
|
-- these need other modules to produce anything
|
||||||
|
|
||||||
|
CN ::= AP CN ;
|
||||||
|
CN ::= CN AP_post ;
|
||||||
|
CN ::= CN "that" S ;
|
||||||
|
|
||||||
|
CN_Pl ::= AP CN_Pl ;
|
||||||
|
CN_Pl ::= CN_Pl AP_post ;
|
||||||
|
|
||||||
77
resource-1.0/exper/Numeral.cf
Normal file
77
resource-1.0/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" ;
|
||||||
3
resource-1.0/exper/Participle.cf
Normal file
3
resource-1.0/exper/Participle.cf
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
-- to recognize passives and present participles; overgen now
|
||||||
|
Comp ::= VP ;
|
||||||
|
|
||||||
12
resource-1.0/exper/Phrase.cf
Normal file
12
resource-1.0/exper/Phrase.cf
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
Phr ::= PConj S ;
|
||||||
|
Phr ::= PConj IP ;
|
||||||
|
Phr ::= PConj IAdv ;
|
||||||
|
|
||||||
|
Phr ::= PConj Imp Please ;
|
||||||
|
Phr ::= PConj QS Please ;
|
||||||
|
Phr ::= PConj NP Please ;
|
||||||
|
Phr ::= PConj Adv Please ;
|
||||||
|
Phr ::= PConj "to" VP Please ;
|
||||||
|
|
||||||
|
|
||||||
|
Please ::= | "please" ;
|
||||||
2
resource-1.0/exper/Rules.cf
Normal file
2
resource-1.0/exper/Rules.cf
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
-- include Noun.cf Adj.cf Verb.cf Sent.cf Adverb.cf Phrase.cf Numeral.cf Structural.cf Lex.cf Biglex.cf Coord.cf Tense.cf Irreg.cf Participle.cf
|
||||||
|
|
||||||
2
resource-1.0/exper/Rulesf.cf
Normal file
2
resource-1.0/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
|
||||||
|
|
||||||
73
resource-1.0/exper/Sent.cf
Normal file
73
resource-1.0/exper/Sent.cf
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
--- 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 ::= NP OptAdV V2 ;
|
||||||
|
Slash ::= NP OptAdV VV "to" V2 ;
|
||||||
|
Slash ::= NP Cop OptAdV A2 Prep ;
|
||||||
|
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 QSlash ;
|
||||||
|
|
||||||
|
QSlash ::= Slash | QS Prep ;
|
||||||
|
|
||||||
|
-- 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 ::= NP Prep IP ; --N2
|
||||||
|
|
||||||
|
IP ::= IDet OptNum CN ;
|
||||||
|
IP ::= IDet OptNum_Pl CN_Pl ;
|
||||||
|
IP ::= IP PP ;
|
||||||
|
|
||||||
|
FunRP. RP ::= NP Prep RP ; -- ?
|
||||||
|
RP ::= "whose" OptNum CN ;
|
||||||
|
RP ::= "whose" OptNum_Pl CN_Pl ;
|
||||||
|
|
||||||
|
-- imperative
|
||||||
|
|
||||||
|
PosImpVP. Imp ::= VP ;
|
||||||
|
NegImpVP. Imp ::= "don't" VP ;
|
||||||
70
resource-1.0/exper/Sentf.cf
Normal file
70
resource-1.0/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 ;
|
||||||
39
resource-1.0/exper/Structural.cf
Normal file
39
resource-1.0/exper/Structural.cf
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
-- structural words
|
||||||
|
|
||||||
|
Predet ::= "only" | "just" ;
|
||||||
|
|
||||||
|
Quant ::= "this" | "that" | "the" | "a" | "an" | "every" | "some" ;
|
||||||
|
|
||||||
|
Predet_Pl ::= "all" | "only" | "just" | "most" "of" ;
|
||||||
|
|
||||||
|
Quant_Pl ::= "these" | "those" | "the" | "many" | "some" ;
|
||||||
|
|
||||||
|
Pron ::= "I" | "you" | "he" | "she" | "we" | "they" | "it" ;
|
||||||
|
Pron ::= "me" | "him" | "her" | "us" | "them" ;
|
||||||
|
Poss ::= "my" | "your" | "his" | "her" | "our" | "their" | "its" ;
|
||||||
|
|
||||||
|
Prep ::= "about" | "at" | "by" | "for" | "from" | "in" | "of" | "on" | "to" | "with" ;
|
||||||
|
Prep ::= "after" | "before" | "despite" | "during" ;
|
||||||
|
|
||||||
|
IAdv ::= "why" | "where" | "when" | "how" ;
|
||||||
|
|
||||||
|
IP ::= "who" | "whom" | "what" ;
|
||||||
|
|
||||||
|
IDet ::= "which" | "how" "many" | "whose" ;
|
||||||
|
|
||||||
|
RP ::= "which" | "who" | "that" | "whom" ;
|
||||||
|
|
||||||
|
PConj ::= | "and" | "but" | "therefore" ;
|
||||||
|
|
||||||
|
NP ::= "this" | "that" | "those" | "these" ;
|
||||||
|
|
||||||
|
Conj ::= "and" | "or" ;
|
||||||
|
|
||||||
|
Subj ::= "if" | "when" | "although" | "though" ;
|
||||||
|
Subj ::= "before" | "after" | "while" | "because" ;
|
||||||
|
|
||||||
|
-- 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" ;
|
||||||
27
resource-1.0/exper/Tense.cf
Normal file
27
resource-1.0/exper/Tense.cf
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
-- this is superfluous in gf
|
||||||
|
|
||||||
|
VP ::= Have V ;
|
||||||
|
VP ::= Have V2 NP ;
|
||||||
|
VP ::= Have Been Comp ;
|
||||||
|
|
||||||
|
S ::= "there" Have Been NP ;
|
||||||
|
QS ::= Have "there" Been NP ;
|
||||||
|
|
||||||
|
Slash ::= NP Have OptAdV V2 ;
|
||||||
|
Slash ::= NP Have OptAdV VV "to" V2 ;
|
||||||
|
Slash ::= NP Have Cop OptAdV A2 Prep ;
|
||||||
|
QS ::= Have NP Been Comp ;
|
||||||
|
|
||||||
|
QS ::= IAdv Mod NP VP ;
|
||||||
|
QS ::= IAdv Have NP Been ;
|
||||||
|
|
||||||
|
IAdv ::= Prep IP ;
|
||||||
|
|
||||||
|
--
|
||||||
|
|
||||||
|
Cop ::= "was" | "were" | "wasn't" | "weren't" ;
|
||||||
|
Do ::= "did" | "didn't" ;
|
||||||
|
Mod ::= "could" | "couldn't" ;
|
||||||
|
|
||||||
|
Have ::= "has" | "have" | "had" | "hasn't" | "haven't" | "hadn't" ;
|
||||||
|
Been ::= "been" ;
|
||||||
25
resource-1.0/exper/Verb.cf
Normal file
25
resource-1.0/exper/Verb.cf
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
|
||||||
|
-- PredV0. S ::= "it" V0 ;
|
||||||
|
V ::= V0 ;
|
||||||
|
|
||||||
|
UseV. VP ::= V ;
|
||||||
|
ComplV2. VP ::= V2 NP ;
|
||||||
|
|
||||||
|
VP ::= VP SC ;
|
||||||
|
|
||||||
|
-- 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 ;
|
||||||
|
|
||||||
|
Comp ::= AP | NP | Adv ;
|
||||||
|
Comp ::= AP_post ; -- not needed in gf
|
||||||
|
|
||||||
|
Mod ::= Do ;
|
||||||
|
|
||||||
|
-- partial saturation
|
||||||
|
|
||||||
|
V ::= V2 ;
|
||||||
15
resource-1.0/exper/Verbf.cf
Normal file
15
resource-1.0/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 ;
|
||||||
|
|
||||||
@@ -4,6 +4,7 @@ abstract Noun = Cat ** {
|
|||||||
DetCN : Det -> CN -> NP ;
|
DetCN : Det -> CN -> NP ;
|
||||||
UsePN : PN -> NP ;
|
UsePN : PN -> NP ;
|
||||||
UsePron : Pron -> NP ;
|
UsePron : Pron -> NP ;
|
||||||
|
UsePron2 : Pron -> NP ;
|
||||||
|
|
||||||
MkDet : Predet -> Quant -> Num -> Det ;
|
MkDet : Predet -> Quant -> Num -> Det ;
|
||||||
|
|
||||||
@@ -5,7 +5,8 @@ concrete NounEng of Noun = CatEng ** open ResEng in {
|
|||||||
lin
|
lin
|
||||||
DetCN det cn = {s = \\c => det.s ++ cn.s ! det.n ! c} ** agrP3 det.n ;
|
DetCN det cn = {s = \\c => det.s ++ cn.s ! det.n ! c} ** agrP3 det.n ;
|
||||||
UsePN pn = pn ** agrP3 Sg ;
|
UsePN pn = pn ** agrP3 Sg ;
|
||||||
UsePron p = p ; --- causes mcfg error, even if expanded
|
-- UsePron p = p ; --- causes mcfg error, even if expanded
|
||||||
|
UsePron2 p = {s=p.s; a={n=p.a.n;p=p.a.p}} ; --- causes mcfg error, even if expanded
|
||||||
|
|
||||||
MkDet pred quant num = {
|
MkDet pred quant num = {
|
||||||
s = pred.s ++ quant.s ++ num.s ;
|
s = pred.s ++ quant.s ++ num.s ;
|
||||||
Reference in New Issue
Block a user