simple problem tracing
This commit is contained in:
1 parent
2700fc1360
commit
a2ef232f2f
63 files changed
+8926
-1
No files matched your search
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -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
|
||||
@@ -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 ;
|
||||
|
||||
@@ -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 ;
|
||||
|
||||
@@ -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 ;
|
||||
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -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 ;
|
||||
@@ -0,0 +1 @@
|
||||
V ::= "ate" | "awake" | "awakes" | "awaking" | "awoke" | "awoken" | "bade" | "bear" | "bearing" | "bears" | "beat" | "beating" | "beats" | "became" | "become" | "becomes" | "becoming" | "began" | "begin" | "begining" | "begins" | "begun" | "bend" | "bending" | "bends" | "bent" | "beset" | "beseting" | "besets" | "bet" | "bets" | "betting" | "bid" | "bidden" | "bidding" | "bids" | "bind" | "binding" | "binds" | "bit" | "bite" | "bites" | "biting" | "bitten" | "bled" | "bleed" | "bleeding" | "bleeds" | "blew" | "blow" | "blowing" | "blown" | "blows" | "bore" | "born" | "bought" | "bound" | "break" | "breaking" | "breaks" | "bred" | "breed" | "breeding" | "breeds" | "bring" | "bringing" | "brings" | "broadcast" | "broadcasting" | "broadcasts" | "broke" | "broken" | "brought" | "build" | "building" | "builds" | "built" | "burn" | "burned" | "burning" | "burns" | "burnt" | "burst" | "bursting" | "bursts" | "buy" | "buying" | "buys" | "came" | "cast" | "casting" | "casts" | "catch" | "catches" | "catching" | "caught" | "choose" | "chooses" | "choosing" | "chose" | "chosen" | "cling" | "clinging" | "clings" | "clung" | "come" | "comes" | "coming" | "cost" | "costing" | "costs" | "creep" | "creeping" | "creeps" | "crept" | "cut" | "cuts" | "cutting" | "deal" | "dealing" | "deals" | "dealt" | "did" | "dig" | "digging" | "digs" | "dive" | "dived" | "dives" | "diving" | "do" | "does" | "doing" | "done" | "dove" | "drank" | "draw" | "drawing" | "drawn" | "draws" | "dream" | "dreamed" | "dreaming" | "dreams" | "dreamt" | "drew" | "drink" | "drinking" | "drinks" | "drive" | "driven" | "drives" | "driving" | "drove" | "drunk" | "dug" | "eat" | "eaten" | "eating" | "eats" | "fall" | "fallen" | "falling" | "falls" | "fed" | "feed" | "feeding" | "feeds" | "feel" | "feeling" | "feels" | "fell" | "felt" | "fight" | "fighting" | "fights" | "find" | "finding" | "finds" | "fit" | "fits" | "fitting" | "fled" | "flee" | "fleeing" | "flees" | "flew" | "flies" | "fling" | "flinging" | "flings" | "flown" | "flung" | "fly" | "flying" | "forbade" | "forbid" | "forbidden" | "forbidding" | "forbids" | "forgave" | "forget" | "forgets" | "forgetting" | "forgive" | "forgiven" | "forgives" | "forgiving" | "forgot" | "forgotten" | "forsake" | "forsaken" | "forsakes" | "forsaking" | "forsook" | "fought" | "found" | "freeze" | "freezes" | "freezing" | "froze" | "frozen" | "gave" | "get" | "gets" | "getting" | "give" | "given" | "gives" | "giving" | "go" | "going" | "gone" | "gos" | "got" | "gotten" | "grew" | "grind" | "grinding" | "grinds" | "ground" | "grow" | "growing" | "grown" | "grows" | "had" | "hang" | "hanging" | "hangs" | "has" | "have" | "having" | "hear" | "heard" | "hearing" | "hears" | "held" | "hid" | "hidden" | "hide" | "hides" | "hiding" | "hit" | "hits" | "hitting" | "hold" | "holding" | "holds" | "hung" | "hurt" | "hurting" | "hurts" | "keep" | "keeping" | "keeps" | "kept" | "kneel" | "kneeling" | "kneels" | "knelt" | "knew" | "knit" | "knits" | "knitting" | "know" | "knowing" | "knows" | "laid" | "lain" | "lay" | "laying" | "lays" | "lead" | "leading" | "leads" | "leap" | "leaped" | "leaping" | "leaps" | "learn" | "learned" | "learning" | "learns" | "learnt" | "leave" | "leaves" | "leaving" | "led" | "left" | "lend" | "lending" | "lends" | "lent" | "lept" | "let" | "lets" | "letting" | "lie" | "lies" | "light" | "lighted" | "lighting" | "lights" | "liing" | "lit" | "lose" | "loses" | "losing" | "lost" | "made" | "make" | "makes" | "making" | "mean" | "meaning" | "means" | "meant" | "meet" | "meeting" | "meets" | "met" | "misspell" | "misspelled" | "misspelling" | "misspells" | "misspelt" | "mistake" | "mistaken" | "mistakes" | "mistaking" | "mistook" | "mow" | "mowed" | "mowing" | "mown" | "mows" | "overcame" | "overcome" | "overcomes" | "overcoming" | "overdid" | "overdo" | "overdoes" | "overdoing" | "overdone" | "overtake" | "overtaken" | "overtakes" | "overtaking" | "overthrew" | "overthrow" | "overthrowing" | "overthrown" | "overthrows" | "overtook" | "paid" | "pay" | "paying" | "pays" | "plead" | "pleading" | "pleads" | "pled" | "prove" | "proved" | "proven" | "proves" | "proving" | "put" | "puts" | "putting" | "quit" | "quits" | "quitting" | "ran" | "rang" | "read" | "reading" | "reads" | "rid" | "ridden" | "ridding" | "ride" | "rides" | "riding" | "rids" | "ring" | "ringing" | "rings" | "rise" | "risen" | "rises" | "rising" | "rode" | "rose" | "run" | "rung" | "running" | "runs" | "said" | "sang" | "sank" | "sat" | "saw" | "sawed" | "sawing" | "sawn" | "saws" | "say" | "saying" | "says" | "see" | "seeing" | "seek" | "seeking" | "seeks" | "seen" | "sees" | "sell" | "selling" | "sells" | "send" | "sending" | "sends" | "sent" | "set" | "sets" | "setting" | "sew" | "sewed" | "sewing" | "sewn" | "sews" | "shake" | "shaken" | "shakes" | "shaking" | "shave" | "shaved" | "shaven" | "shaves" | "shaving" | "shear" | "shearing" | "shears" | "shed" | "shedding" | "sheds" | "shine" | "shines" | "shining" | "shod" | "shoe" | "shoedLine truncated
|
||||
@@ -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" ;
|
||||
@@ -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"
|
||||
@@ -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 ;
|
||||
|
||||
@@ -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" ;
|
||||
@@ -0,0 +1,3 @@
|
||||
-- to recognize passives and present participles; overgen now
|
||||
Comp ::= VP ;
|
||||
|
||||
@@ -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" ;
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 ;
|
||||
@@ -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 ;
|
||||
@@ -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" ;
|
||||
@@ -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" ;
|
||||
@@ -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 ;
|
||||
@@ -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 ;
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -4,6 +4,7 @@ abstract Noun = Cat ** {
|
||||
DetCN : Det -> CN -> NP ;
|
||||
UsePN : PN -> NP ;
|
||||
UsePron : Pron -> NP ;
|
||||
UsePron2 : Pron -> NP ;
|
||||
|
||||
MkDet : Predet -> Quant -> Num -> Det ;
|
||||
|
||||
@@ -5,7 +5,8 @@ concrete NounEng of Noun = CatEng ** open ResEng in {
|
||||
lin
|
||||
DetCN det cn = {s = \\c => det.s ++ cn.s ! det.n ! c} ** agrP3 det.n ;
|
||||
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 = {
|
||||
s = pred.s ++ quant.s ++ num.s ;
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Reference in new issue
Block a user