From a557898c2db5263dd8c7810647fbfd961ee99518 Mon Sep 17 00:00:00 2001 From: aarne Date: Tue, 15 Nov 2005 16:54:56 +0000 Subject: [PATCH] cf exper on res --- lib/resource/exper/Adj.cf | 26 ++++++++++++ lib/resource/exper/Adverb.cf | 22 ++++++++++ lib/resource/exper/Det.cf | 25 ------------ lib/resource/exper/Lex.cf | 9 +++++ lib/resource/exper/Noun.cf | 78 ++++++++++++++++++++++++++++++++++++ lib/resource/exper/Phrase.cf | 8 ++++ lib/resource/exper/Rules.cf | 2 + lib/resource/exper/Sent.cf | 49 ++++++++++++++++++++++ lib/resource/exper/Verb.cf | 28 +++++++++++++ 9 files changed, 222 insertions(+), 25 deletions(-) create mode 100644 lib/resource/exper/Adj.cf create mode 100644 lib/resource/exper/Adverb.cf delete mode 100644 lib/resource/exper/Det.cf create mode 100644 lib/resource/exper/Lex.cf create mode 100644 lib/resource/exper/Noun.cf create mode 100644 lib/resource/exper/Phrase.cf create mode 100644 lib/resource/exper/Rules.cf create mode 100644 lib/resource/exper/Sent.cf create mode 100644 lib/resource/exper/Verb.cf diff --git a/lib/resource/exper/Adj.cf b/lib/resource/exper/Adj.cf new file mode 100644 index 000000000..720d7f768 --- /dev/null +++ b/lib/resource/exper/Adj.cf @@ -0,0 +1,26 @@ +PositA. AP ::= A ; +ComplA2. AP_post ::= A2 Prep NP ; +ComparA. AP_post ::= "more" A "than" NP ; + +-- superlatives à la CLE + +Num ::= "most" A ; +Num_Pl ::= "most" A ; + +ComplAV. AP_post ::= AV Prep VP ; +UseA2V. AV ::= A2V Prep NP ; + +PredAS. Cl ::= "it" "be" 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" ; diff --git a/lib/resource/exper/Adverb.cf b/lib/resource/exper/Adverb.cf new file mode 100644 index 000000000..94ccd5a5b --- /dev/null +++ b/lib/resource/exper/Adverb.cf @@ -0,0 +1,22 @@ +-- adverbs + +AdjAdv. Adv ::= A "+ly" ; +AdvPP. Adv ::= PP ; +PrepNP. Adv ::= 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 ; + +-- lexicon + +Prep ::= "of" | "to" ; +Adv ::= "here" ; +AdA ::= "very" ; +AdV ::= "always" ; diff --git a/lib/resource/exper/Det.cf b/lib/resource/exper/Det.cf deleted file mode 100644 index 51a66dc17..000000000 --- a/lib/resource/exper/Det.cf +++ /dev/null @@ -1,25 +0,0 @@ -NP ::= Det CN ; -Det ::= Predets Quants ; - -Predets ::= ; - -Predets ::= "only" | "just" ; -Quants ::= "this" | "my" | "one" | "the" | "a" | "every" | "some" ; - -NP ::= Detp CNp ; -Detp ::= Predet Quant Num ; - -Predet ::= ; -Quant ::= ; -Num ::= ; - -Predet ::= "all" | "only" | "just" ; - -Quant ::= "these" | "my" | "many" | "some" ; - -Num ::= "four" ; - -CNp ::= "sons" ; -CN ::= "son" ; - --- diff --git a/lib/resource/exper/Lex.cf b/lib/resource/exper/Lex.cf new file mode 100644 index 000000000..518a4ea3e --- /dev/null +++ b/lib/resource/exper/Lex.cf @@ -0,0 +1,9 @@ +-- a bigger lexicon + +Pron ::= "I" | "me" | "he" | "she" ; +Pron ::= "us" | "we" ; +Poss ::= "your" | "his" | "her" | "our" ; +Prep ::= "about" | "for" | "from" | "in" ; + +N ::= "car" | "house" | "flight" | "aircraft" ; +N_Pl ::= "cars" | "houses" | "flights" | "aircraft" ; diff --git a/lib/resource/exper/Noun.cf b/lib/resource/exper/Noun.cf new file mode 100644 index 000000000..c5318bcf4 --- /dev/null +++ b/lib/resource/exper/Noun.cf @@ -0,0 +1,78 @@ +NP ::= Det CN ; +NP ::= PN ; +NP ::= Pron ; +Det ::= Predet Quant Num ; +Det ::= Predet Quant ; + +Predet ::= ; + +Predet ::= "only" | "just" ; +Quant ::= "this" | "the" | "a" | "every" | "some" ; + +Num ::= "one" ; + +Quant ::= Poss ; + +Quant ::= ; -- for NMass + +---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 ; + +Predet_Pl ::= ; +Quant_Pl ::= ; + +Predet_Pl ::= "all" | "only" | "just" ; + +Quant_Pl ::= "these" | "many" | "some" ; + +Quant_Pl ::= Poss ; + +Poss ::= NP "'s" | "my" ; + +Num_Pl ::= Int ; +Num_Pl ::= "four" ; + +CN_Pl ::= N_Pl ; +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 ; + +-- elliptical constructions + +N2 ::= N3 ; +CN ::= 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 ; + +-- some open lexicon + +N_Pl ::= "sons" ; +N ::= "son" ; + +N2 ::= "plan" ; +N3 ::= "value" ; + +N ::= "wine" ; + +PN ::= "John" ; + diff --git a/lib/resource/exper/Phrase.cf b/lib/resource/exper/Phrase.cf new file mode 100644 index 000000000..128b725cf --- /dev/null +++ b/lib/resource/exper/Phrase.cf @@ -0,0 +1,8 @@ +Phr ::= PConj Imp ; +Phr ::= PConj S ; +Phr ::= PConj QS ; + +Phr ::= PConj "please" Imp | PConj QS "please" ; +Phr ::= PConj NP | PConj NP "please" ; + +PConj ::= | "and" | "but" | "therefore" ; diff --git a/lib/resource/exper/Rules.cf b/lib/resource/exper/Rules.cf new file mode 100644 index 000000000..fd8dc284d --- /dev/null +++ b/lib/resource/exper/Rules.cf @@ -0,0 +1,2 @@ +-- include Det.cf Adj.cf Verb.cf Sent.cf Adverb.cf Phrase.cf Lex.cf + diff --git a/lib/resource/exper/Sent.cf b/lib/resource/exper/Sent.cf new file mode 100644 index 000000000..a0c48eece --- /dev/null +++ b/lib/resource/exper/Sent.cf @@ -0,0 +1,49 @@ +--- just one tense considered; no agreement forced + +S ::= NP Do VP ; +S ::= Adv "," S ; + +-- slash category instead of gaps + +Slash ::= NP V2 ; +Slash ::= NP VV "to" V2 ; +Slash ::= NP Cop A2 Prep ; +Slash ::= S Prep ; +Slash ::= Slash Adv ; -- who does my son love here + +-- questions + +QS ::= Do 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 ; + +-- general: QuestAdv : IAdv -> Cl -> QCl ; +QS ::= IAdv Do NP VP ; +QS ::= IAdv Cop NP ; + +IAdv ::= "why" | "where" | "when" ; + +-- relatives + +RelVP. RS ::= RP VP ; +RS ::= RP "doesn't" VP ; +RelSlash. RS ::= RP Slash ; + +-- CLE syntax of relatives +NP ::= NP RS ; + +IP ::= "who" ; +FunIP. IP ::= "the" N2 "of" IP ; + +RP ::= "which" ; +FunRP. RP ::= "the" N2 "of" RP ; -- ? + +-- imperative + +PosImpVP. Imp ::= VP ; +NegImpVP. Imp ::= "don't" VP ; diff --git a/lib/resource/exper/Verb.cf b/lib/resource/exper/Verb.cf new file mode 100644 index 000000000..6be647d9c --- /dev/null +++ b/lib/resource/exper/Verb.cf @@ -0,0 +1,28 @@ + +PredV0. S ::= "it" V0 ; + +UseV. VP ::= V ; +ComplV2. VP ::= V2 NP ; +ComplV3. VP ::= V3 NP NP ; +ComplVV. VP ::= VV "to" VP ; + +VP ::= Cop Comp ; + +Comp ::= AP | NP | Adv ; + +-- 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" ;