diff options
| author | aarne <unknown> | 2003-11-20 15:53:22 +0000 |
|---|---|---|
| committer | aarne <unknown> | 2003-11-20 15:53:22 +0000 |
| commit | 259eb4c86688db70b0beb76721e7df79164d4e5e (patch) | |
| tree | 8ee67c14ac28d3e9cc395f9009cb653d8f5a265d /grammars/resource/nabstract | |
| parent | 1ca5e5398abd42fe71d4fe541e84318df0351e20 (diff) | |
Resource with extended API
Diffstat (limited to 'grammars/resource/nabstract')
| -rw-r--r-- | grammars/resource/nabstract/Combinations.gf | 29 | ||||
| -rw-r--r-- | grammars/resource/nabstract/Structural.gf | 23 | ||||
| -rw-r--r-- | grammars/resource/nabstract/TestResource.gf | 6 | ||||
| -rw-r--r-- | grammars/resource/nabstract/additions.txt | 136 |
4 files changed, 121 insertions, 73 deletions
diff --git a/grammars/resource/nabstract/Combinations.gf b/grammars/resource/nabstract/Combinations.gf index e97a507ba..1679bbd0e 100644 --- a/grammars/resource/nabstract/Combinations.gf +++ b/grammars/resource/nabstract/Combinations.gf @@ -48,6 +48,7 @@ cat Det ; -- determiner, e.g. "every", "all" Fun ; -- function word, e.g. "mother (of)" Fun2 ; -- two-place function, e.g. "flight (from) (to)" + Num ; -- numeral, e.g. "three", "879" --3 Adjectives and adjectival phrases -- @@ -64,6 +65,7 @@ cat TV ; -- two-place verb, e.g. "love", "wait (for)", "switch on" V3 ; -- three-place verb, e.g. "give", "prefer (stg) (to stg)" VS ; -- sentence-compl. verb, e.g. "say", "prove" +--- VV ; -- verb-compl. verb, e.g. "can", "want" VP ; -- verb phrase, e.g. "switch the light on" --3 Adverbials @@ -124,16 +126,19 @@ fun ModAdj : AP -> CN -> CN ; -- "red car" DetNP : Det -> CN -> NP ; -- "every car" MassNP : CN -> NP ; -- "wine" - IntNP : Int -> CN -> NP ; -- "86 houses" --- assumes i > 1 - DefIntNP : Int -> CN -> NP ; -- "the 86 houses" --- assumes i > 1 - IndefOneNP, IndefManyNP : CN -> NP ; -- "a car", "cars" - DefOneNP, DefManyNP : CN -> NP ; -- "the car", "the cars" - ModGenOne, ModGenMany : NP -> CN -> NP ; -- "John's car", "John's cars" + IndefOneNP : CN -> NP ; -- "a car", "cars" + IndefManyNP : Num -> CN -> NP ; -- "houses", "86 houses" + DefOneNP : CN -> NP ; -- "the car" + DefManyNP : Num -> CN -> NP ; -- "the cars", "the 86 cars" + ModGenOne : NP -> CN -> NP ; -- "John's car" + ModGenMany : Num -> NP -> CN -> NP ; -- "John's cars", "John's 86 cars" UsePN : PN -> NP ; -- "John" UseFun : Fun -> CN ; -- "successor" AppFun : Fun -> NP -> CN ; -- "successor of zero" AppFun2 : Fun2 -> NP -> Fun ; -- "flight from Paris" CNthatS : CN -> S -> CN ; -- "idea that the Earth is flat" + UseInt : Int -> Num ; -- "32" --- assumes i > 1 + NoNum : Num ; -- no numeral modifier --3 Adjectives and adjectival phrases -- @@ -153,17 +158,21 @@ fun PosTV, NegTV : TV -> NP -> VP ; -- "sees John", "doesn't see John" PosPassV, NegPassV : V -> VP ; -- "is seen", "is not seen" PosNP, NegNP : NP -> VP ; -- "is John", "is not John" + PosAdV, NegAdV : AdV -> VP ; -- "is everywhere", "is not in France" PosVS, NegVS : VS -> S -> VP ; -- "says that I run", "doesn't say..." +--- PosVV, NegVV : VV -> VP -> VP ; -- "can run", "can't run", "tries to run" PosV3, NegV3 : V3 -> NP -> NP -> VP ; -- "prefers wine to beer" VTrans : TV -> V ; -- "loves" --3 Adverbials -- +-- Here is how complex adverbials can be formed and used. - AdvVP : VP -> AdV -> VP ; -- "always walks", "walks in the park" + AdjAdv : AP -> AdV ; -- "freely", "more consciously than you" PrepNP : Prep -> NP -> AdV ; -- "in London", "after the war" - AdvCN : CN -> AdV -> CN ; -- "house in London", "house today" + AdvVP : VP -> AdV -> VP ; -- "always walks", "walks in the park" + AdvCN : CN -> AdV -> CN ; -- "house in London", "house today" AdvAP : AdA -> AP -> AP ; -- "very good" @@ -173,7 +182,8 @@ fun PredVP : NP -> VP -> S ; -- "John walks" PosSlashTV, NegSlashTV : NP -> TV -> Slash ; -- "John sees", "John doesn's see" OneVP : VP -> S ; -- "one walks" - ThereIsCN, ThereAreCN : CN -> S ; -- "there is a car", "there are cars" + ThereIsCN : CN -> S ; -- "there is a bar" + ThereAreCN : Num -> CN -> S ; -- "there are 86 bars" IdRP : RP ; -- "which" FunRP : Fun -> RP -> RP ; -- "the successor of which" @@ -194,7 +204,8 @@ fun IntVP : IP -> VP -> Qu ; -- "who walks" IntSlash : IP -> Slash -> Qu ; -- "whom does John see" QuestAdv : IAdv -> NP -> VP -> Qu ; -- "why do you walk" - IsThereCN, AreThereCN : CN -> Qu ; -- "is there a bar", "are there bars" + IsThereCN : CN -> Qu ; -- "is there a bar" + AreThereCN : Num -> CN -> Qu ; -- "are there (86) bars" ImperVP : VP -> Imp ; -- "be a man" diff --git a/grammars/resource/nabstract/Structural.gf b/grammars/resource/nabstract/Structural.gf index 536f01985..5ac998f96 100644 --- a/grammars/resource/nabstract/Structural.gf +++ b/grammars/resource/nabstract/Structural.gf @@ -8,16 +8,26 @@ abstract Structural = Combinations ** { fun - EveryDet, AllDet, WhichDet, MostDet : Det ; -- every, all, which, most - SomeDet, SomesDet, AnyDet, AnysDet, NoDet, -- sg/pl some, any, no - NosDet, ManyDet, MuchDet : Det ; -- many, much - ThisDet, TheseDet, ThatDet, ThoseDet : Det ;-- (this, these, that, those) car(s) - ThisNP, TheseNP, ThatNP, ThoseNP : NP ; -- this, these, that, those + EveryDet, WhichDet, AllDet, -- every, sg which, sg all + SomeDet, AnyDet, NoDet, -- sg some, any, no + MostDet, MostsDet, ManyDet, MuchDet : Det ; -- sg most, pl most, many, much + ThisDet, ThatDet : Det ; -- this, that + +-- Many plural determiners can take a numeral modifier. + + AllsDet, WhichsDet, -- pl all, which (86) + SomesDet, AnysDet, NosDet, -- pl some, any, no + TheseDet, ThoseDet : Num -> Det ; -- these, those (86) + ThisNP, ThatNP : NP ; -- this, that + TheseNP, ThoseNP : Num -> NP ; -- these, those (86) INP, ThouNP, HeNP, SheNP, ItNP : NP ; -- personal pronouns in singular - WeNP, YeNP, TheyNP : NP ; -- personal pronouns in plural + WeNP, YeNP : Num -> NP ; -- these pronouns can take numeral + TheyNP : NP ; -- personal pronouns in plural YouNP : NP ; -- the polite you EverybodyNP, SomebodyNP, NobodyNP, -- everybody, somebody, nobody EverythingNP, SomethingNP, NothingNP : NP ; -- everything, something, nothing +--- CanVV, CanKnowVV, MustVV : VV ; -- can (pouvoir/savoir), must +--- WantVV : VV ; -- want (to do) WhenIAdv,WhereIAdv,WhyIAdv,HowIAdv : IAdv ; -- when, where, why, how EverywhereNP, SomewhereNP, NowhereNP : AdV ;-- everywhere, somewhere, nowhere AndConj, OrConj : Conj ; -- and, or @@ -32,5 +42,6 @@ fun InFrontPrep, BehindPrep, BetweenPrep : Prep ; BeforePrep, DuringPrep, AfterPrep : Prep ; -- temporal relations WithPrep, WithoutPrep, ByMeansPrep : Prep ; -- some other relations + PartPrep : Prep ; -- partitive "of" ("bottle of wine") AgentPrep : Prep ; -- agent "by" in passive constructions } diff --git a/grammars/resource/nabstract/TestResource.gf b/grammars/resource/nabstract/TestResource.gf index d1764aa3d..adafdcfbc 100644 --- a/grammars/resource/nabstract/TestResource.gf +++ b/grammars/resource/nabstract/TestResource.gf @@ -3,12 +3,12 @@ abstract TestResource = Structural ** { -- a random sample of lexicon to test resource grammar with fun - Big, Small, Old, Young : AdjDeg ; + Big, Happy, Small, Old, Young : AdjDeg ; American, Finnish : Adj1 ; Married : Adj2 ; - Man, Woman, Car, House, Light : N ; + Man, Woman, Car, House, Light, Bar, Bottle, Wine : N ; Walk, Run : V ; - Send, Wait, Love, SwitchOn, SwitchOff : TV ; + Send, Wait, Love, Drink, SwitchOn, SwitchOff : TV ; Give, Prefer : V3 ; Say, Prove : VS ; Mother, Uncle : Fun ; diff --git a/grammars/resource/nabstract/additions.txt b/grammars/resource/nabstract/additions.txt index 7f63bd81c..cbb5646ce 100644 --- a/grammars/resource/nabstract/additions.txt +++ b/grammars/resource/nabstract/additions.txt @@ -2,58 +2,82 @@ -- Combinations.gf cat - Prep ; -- pre/postposition and/or case + Prep ; -- pre/postposition and/or case e.g. + Num ; -- numeral, e.g. "three", "879" +--- VV ; -- verb-compl. verb, e.g. "can", "want" + fun - ThereIsCN, ThereAreCN : CN -> S ; -- "there is a bar", "there are bars" + ThereIsCN : CN -> S ; -- "there is a bar", "there are bars" + ThereAreCN : Num -> CN -> S ; -- "there are 86 bars" PrepNP : Prep -> NP -> AdV ; -- "in London", "after the war" (replace LocNP) MassNP : CN -> NP ; -- "wine" - IntNP : Int -> CN -> NP ; -- "86 houses" --- assumes i > 1 - DefIntNP : Int -> CN -> NP ; -- "the 86 houses" --- assumes i > 1 +--- PosVV, NegVV : VV -> VP -> VP ; -- "can run", "can't run", "tries to run" + PosAdV, NegAdV : AdV -> VP ; -- "is everywhere", "is not in France" + AdjAdv : AP -> AdV ; -- "freely", "more consciously than you" + IsThereCN, AreThereCN : CN -> Qu ;-- "is there a bar", "are there bars" + + + -- changed type signatures: added Num + IndefManyNP : Num -> CN -> NP ; -- "houses", "86 houses" + DefManyNP : Num -> CN -> NP ; -- "the cars", "the 86 cars" + ModGenMany : Num -> NP -> CN -> NP ; -- "John's cars", "John's 86 cars" + + UseInt : Int -> Num ; -- "32" --- assumes i > 1 + NoNum : Num ; -- no numeral modifier + IsThereCN, AreThereCN : CN -> Qu ;-- "is there a bar", "are there bars" -Warning: no linearization of AdvAP -checking module ResFra -Warning: no linearization of AdvS -checking module ResFra -Warning: no linearization of AppFun2 -checking module ResFra -Warning: no linearization of CNthatS -checking module ResFra -Warning: no linearization of ConsPhr -checking module ResFra -Warning: no linearization of ItNP -checking module ResFra -Warning: no linearization of NegPassV -checking module ResFra -Warning: no linearization of NegV3 -checking module ResFra -Warning: no linearization of OnePhr -checking module ResFra -Warning: no linearization of OneVP -checking module ResFra -Warning: no linearization of OtherwiseAdv -checking module ResFra -Warning: no linearization of PosPassV -checking module ResFra -Warning: no linearization of PosV3 -checking module ResFra -Warning: no linearization of SubjVP -checking module ResFra -Warning: no linearization of ThereforeAdv -checking module ResFra -Warning: no linearization of TooAdv -checking module ResFra -Warning: no linearization of VTrans -checking module ResFra -Warning: no linearization of VeryAdv +-- from Hajo's work + +AdvAP + +AdvS + +AppFun2 + +CNthatS + +ConsPhr + +ItNP + +NegPassV + +NegV3 + +OnePhr + +OneVP + +OtherwiseAdv + +PosPassV + +PosV3 + +SubjVP + +ThereforeAdv + +TooAdv + +VTrans + +VeryAdv -- Structural.gf - SomeDet, SomesDet, AnyDet, AnysDet, NoDet, -- sg/pl some, any, no - NosDet, ManyDet, MuchDet : Det ; -- many, much - ThisDet, TheseDet, ThatDet, ThoseDet : Det ;-- this, these, that, those - ThisNP, TheseNP, ThatNP, ThoseNP : NP ; -- this, these, that, those +-- Some of these are just changes to Num -> Det|NP. + AllDet : Det ; -- sg all + AllsDet, WhichsDet, -- pl all, which (86) + SomesDet, AnysDet, NosDet, -- pl some, any, no + TheseDet, ThoseDet : Num -> Det ; -- these, those (86) + ThisNP, TheseNP : NP ; -- this, that + TheseNP, ThoseNP : Num -> NP ; -- these, those (86) + INP, ThouNP, HeNP, SheNP, ItNP : NP ; -- personal pronouns in singular + WeNP, YeNP : Num -> NP ; -- these pronouns can take numeral + EverybodyNP, SomebodyNP, NobodyNP, -- everybody, somebody, nobody EverythingNP, SomethingNP, NothingNP : NP ; -- everything, something, nothing EverywhereNP, SomewhereNP, NowhereNP : Adv ;-- everywhere, somewhere, nowhere @@ -64,18 +88,20 @@ Warning: no linearization of VeryAdv InFrontPrep, BehindPrep, BetweenPrep : Prep ; BeforePrep, DuringPrep, AfterPrep : Prep ; -- temporal relations WithPrep, WithoutPrep, ByMeansPrep : Prep ; -- some other relations + PartPrep : Prep ; -- partitive "of" ("bottle of wine") AgentPrep : Prep ; -- agent "by" in passive constructions -checking module TestFra -Warning: no linearization of American -checking module TestFra -Warning: no linearization of Connection -checking module TestFra -Warning: no linearization of Finnish -checking module TestFra -Warning: no linearization of Give -checking module TestFra -Warning: no linearization of Married -checking module TestFra -Warning: no linearization of Prefer + +American + +Connection + +Finnish + +Give + +Married + +Prefer + |
