diff --git a/lib/resource-1.0/Makefile b/lib/resource-1.0/Makefile new file mode 100644 index 000000000..d6778ebb0 --- /dev/null +++ b/lib/resource-1.0/Makefile @@ -0,0 +1,5 @@ +gfdoc: + gfdoc -txthtml abstract/*.gf + gfdoc -txthtml */Paradigms*.gf + mv abstract/*.html doc/gfdoc + mv */Paradigms*.html doc/gfdoc diff --git a/lib/resource-1.0/abstract/Cat.gf b/lib/resource-1.0/abstract/Cat.gf index 0158a5e60..3365a3414 100644 --- a/lib/resource-1.0/abstract/Cat.gf +++ b/lib/resource-1.0/abstract/Cat.gf @@ -1,96 +1,130 @@ +--1 The category system + abstract Cat = { cat --- Top-level units constructed in $Phrase$. +--2 Top-level units + +-- Constructed in [Phrase Phrase.html]. Text ; -- text consisting of several phrases - Phr ; -- phrase in a text e.g. "But be quiet my darling." - Utt ; -- sentence, question, "one-word utterance"... e.g. "be quiet" - Voc ; -- vocative or "please" e.g. "my darling" + Phr ; -- phrase in a text e.g. "But be quiet my darling." + Utt ; -- sentence, question, word... e.g. "be quiet" + Voc ; -- vocative or "please" e.g. "my darling" --- Tensed sentences constructed in $Tensed$ and, with just present forms, in $Untensed$. +--2 Tensed sentences - S ; -- declarative sentence e.g. "she lived here" - QS ; -- question e.g. "where did she live" - RS ; -- relative e.g. "in which she lived" +-- Constructed in [Tensed Tensed.html]. +-- A simplified variant, with just present forms, is [Untensed Untensed.html]. --- Clauses constructed in $Sentence$. + S ; -- declarative sentence e.g. "she lived here" + QS ; -- question e.g. "where did she live" + RS ; -- relative e.g. "in which she lived" - Cl ; -- declarative clause, with all tense forms e.g. "she looks at this" - Slash ; -- clause lacking object (S/NP in GPSG) e.g. "she looks at" - Imp ; -- imperative e.g. "look at this" +--2 Clauses --- Questions and interrogatives, constructed in $Question$. +-- Constructed in [Sentence Sentence.html]. - QCl ; -- question clause, with all tense forms e.g. "why does she walk" - IP ; -- interrogative pronoun e.g. "who" - IAdv ; -- interrogative adverb e.g. "why" - IDet ; -- interrogative determiner e.g. "which" + Cl ; -- declarative clause, with all tenses e.g. "she looks at this" + Slash ; -- clause missing NP (S/NP in GPSG) e.g. "she looks at" + Imp ; -- imperative e.g. "look at this" --- Relatives, constructed in $Relative$. +--2 Questions and interrogatives - RCl ; -- relative clause, with all tense forms e.g. "in which she lives" - RP ; -- relative pronoun e.g. "in which" +-- Constructed in [Question Question.html]. --- Verb phrases, constructed in $Verb$. + QCl ; -- question clause, with all tenses e.g. "why does she walk" + IP ; -- interrogative pronoun e.g. "who" + IAdv ; -- interrogative adverb e.g. "why" + IDet ; -- interrogative determiner e.g. "which" - VP ; -- verb phrase e.g. "is very warm" - Comp ; -- complement of copula, e.g. AP, NP e.g. "very warm" - SC ; -- sentential noun phrase: e.g. 'that' clause e.g. "that it rains" +--2 Relative clauses and pronouns --- Adjectival phrases, constructed in $Adjective$. +-- Constructed in [Relative Relative.html]. - AP ; -- adjectival phrase e.g. "very warm" + RCl ; -- relative clause, with all tenses e.g. "in which she lives" + RP ; -- relative pronoun e.g. "in which" --- Nouns and noun phrases, constructed in $Noun$ (many also in $Structural$). +--2 Verb phrases - CN ; -- common noun (needs determiner to make NP) e.g. "red house" - NP ; -- noun phrase (usable as subject or object) e.g. "the red house" - Pron ; -- personal pronoun e.g. "she" - Det ; -- determiner phrase e.g. "all the seven" - Predet; -- predeterminer (prefixed to a quantifier) e.g. "all" - Quant ; -- quantifier (the 'kernel' of a determiner) e.g. "the" - Num ; -- cardinal number (used in a determiner) e.g. "seven" - Ord ; -- ordinal number (used in a determiner) e.g. "first" +-- Constructed in [Verb Verb.html]. --- Adverbs, constructed in $Adverb$ (many also in $Structural$). + VP ; -- verb phrase e.g. "is very warm" + Comp ; -- complement of copula, such as AP e.g. "very warm" + SC ; -- embedded sentence or question e.g. "that it rains" - Adv ; -- verb-phrase-modifying adverb, e.g. "in the house" - AdV ; -- sentential adverb, typically close to verb e.g. "always" - AdA ; -- adjective-modifying adverb, e.g. "very" - AdN ; -- numeral-modifying adverb, e.g. "more than" +--2 Adjectival phrases --- Numeral with cardinal and ordinal forms, constructed in $Numeral$. +-- Constructed in [Adjective Adjective.html]. - Numeral;-- cardinal or ordinal, e.g. "five/fifth" + AP ; -- adjectival phrase e.g. "very warm" --- Structural words, constructed in $Structural$. +--2 Nouns and noun phrases - Conj ; -- conjunction, e.g. "and" - DConj ; -- distributed conj. e.g. "both - and" - PConj ; -- phrase-beginning conj. e.g. "therefore" - CAdv ; -- comparative adverb e.g. "more" - Subj ; -- subjunction, e.g. "if" - Prep ; -- preposition, or just a case in some langs e.g. "in" +-- Constructed in [Noun Noun.html]. +-- Many atomic noun phrases e.g. "everybody" +-- are constructed in [Structural Structural.html]. +-- The determiner structure is +-- ``` Predet (QuantSg | QuantPl Num) Ord +-- as defined in [Noun Noun.html]. --- Words of open classes, constructed in $Basic$ and in additional lexicon modules. + CN ; -- common noun (without determiner) e.g. "red house" + NP ; -- noun phrase (subject or object) e.g. "the red house" + Pron ; -- personal pronoun e.g. "she" + Det ; -- determiner phrase e.g. "all the seven" + Predet; -- predeterminer (prefixed Quant) e.g. "all" + QuantSg;-- quantifier ('nucleus' of sing. Det) e.g. "this" + QuantPl;-- quantifier ('nucleus' of plur. Det) e.g. "these" + Num ; -- cardinal number (used with QuantPl) e.g. "seven" + Ord ; -- ordinal number (used in Det) e.g. "seventh" - V ; -- one-place verb e.g. "sleep" - V2 ; -- two-place verb e.g. "love" - V3 ; -- three-place verb e.g. "show" - VV ; -- verb-phrase-complement verb e.g. "want" - VS ; -- sentence-complement verb e.g. "claim" - VQ ; -- question-complement verb e.g. "ask" - VA ; -- adjective-complement verb e.g. "look" - V2A ; -- verb with NP and AP complement e.g. "paint" +--2 Adverbs - A ; -- one-place adjective e.g. "warm" - A2 ; -- two-place adjective e.g. "divisible" +-- Constructed in [Adverb Adverb.html]. +-- Many adverbs are constructed in [Structural Structural.html]. - N ; -- common noun e.g. "house" - N2 ; -- relational noun e.g. "son" - N3 ; -- three-place relational noun e.g. "connection" - PN ; -- proper name e.g. "Paris" + Adv ; -- verb-phrase-modifying adverb, e.g. "in the house" + AdV ; -- adverb directly attached to verb e.g. "always" + AdA ; -- adjective-modifying adverb, e.g. "very" + AdN ; -- numeral-modifying adverb, e.g. "more than" + +--2 Numerals + +-- Constructed in [Numeral Numeral.html]. + + Numeral;-- cardinal or ordinal, e.g. "five/fifth" + +--2 Structural words + +-- Constructed in [Structural Structural.html]. + + Conj ; -- conjunction, e.g. "and" + DConj ; -- distributed conj. e.g. "both - and" + PConj ; -- phrase-beginning conj. e.g. "therefore" + CAdv ; -- comparative adverb e.g. "more" + Subj ; -- subjunction, e.g. "if" + Prep ; -- preposition, or just case e.g. "in" + +--2 Words of open classes + +-- These are constructed in [Basic Basic.html] and in additional lexicon modules. + + V ; -- one-place verb e.g. "sleep" + V2 ; -- two-place verb e.g. "love" + V3 ; -- three-place verb e.g. "show" + VV ; -- verb-phrase-complement verb e.g. "want" + VS ; -- sentence-complement verb e.g. "claim" + VQ ; -- question-complement verb e.g. "ask" + VA ; -- adjective-complement verb e.g. "look" + V2A ; -- verb with NP and AP complement e.g. "paint" + + A ; -- one-place adjective e.g. "warm" + A2 ; -- two-place adjective e.g. "divisible" + + N ; -- common noun e.g. "house" + N2 ; -- relational noun e.g. "son" + N3 ; -- three-place relational noun e.g. "connection" + PN ; -- proper name e.g. "Paris" } diff --git a/lib/resource-1.0/abstract/Lex.gf b/lib/resource-1.0/abstract/Lex.gf index 1571200b5..e0cbbd4c2 100644 --- a/lib/resource-1.0/abstract/Lex.gf +++ b/lib/resource-1.0/abstract/Lex.gf @@ -20,8 +20,8 @@ abstract Lex = Cat ** { only_Predet, all_Predet : Predet ; - this_Quant, these_Quant : Quant ; - + this_Quant : QuantSg ; + these_Quant : QuantPl ; i_Pron, he_Pron, we_Pron : Pron ; diff --git a/lib/resource-1.0/abstract/Noun.gf b/lib/resource-1.0/abstract/Noun.gf index aeda5c099..14eb5698f 100644 --- a/lib/resource-1.0/abstract/Noun.gf +++ b/lib/resource-1.0/abstract/Noun.gf @@ -3,42 +3,115 @@ abstract Noun = Cat ** { fun - DetCN : Det -> CN -> NP ; - UsePN : PN -> NP ; - UsePron : Pron -> NP ; --- Determiner structure à la CLE; we further divide $Num$ into cardinal --- and ordinal/superlative. So we get e.g. "my first forty books". +--2 Noun phrases - MkDet : Predet -> Quant -> Num -> Ord -> Det ; - - PossPronSg, PossPronPl : Pron -> Quant ; --- PossNP not in romance +-- The three main types of noun phrases are +-- - common nouns with determiners +-- - proper names +-- - pronouns +-- +-- + DetCN : Det -> CN -> NP ; -- the man + UsePN : PN -> NP ; -- John + UsePron : Pron -> NP ; -- he - NoNum : Num ; - NumInt : Int -> Num ; - NumNumeral : Numeral -> Num ; +-- Pronouns are given in the module [Structural Structural.html]. - AdNum : AdN -> Num -> Num ; - OrdNumeral : Numeral -> Ord ; - - NoOrd : Ord ; - OrdSuperl : A -> Ord ; +--2 Determiners + +-- The determiner has a fine-grained structure, in which four +-- different optional parts can be discerned. The noun phrase +-- "all my first forty books" shows each of these parts. +-- The cardinal numeral is only available for plural determiners. +-- (This is modified from CLE by further dividing their $Num$ into +-- cardinal and ordinal.) + + DetSg : Predet -> QuantSg -> Ord -> Det ; + DetPl : Predet -> QuantPl -> Num -> Ord -> Det ; + +-- Pronouns have possessive forms. Genitives of other kinds +-- of noun phrases are not given here, since they are not possible +-- in e.g. Romance languages. + + PossSg : Pron -> QuantSg ; -- my (house) + PossPl : Pron -> QuantPl ; -- my (houses) + +-- All parts of the determiner can be empty, except $Quant$, which is +-- the "kernel" of a determiner. NoPredet : Predet ; + NoNum : Num ; + NoOrd : Ord ; - DefSg, DefPl : Quant ; - IndefSg, IndefPl : Quant ; +-- $Num$ consists of either digits or numeral words. - ComplN2 : N2 -> NP -> CN ; - ComplN3 : N3 -> NP -> N2 ; + NumInt : Int -> Num ; -- 51 + NumNumeral : Numeral -> Num ; -- fifty-one - AdjCN : AP -> CN -> CN ; - RelCN : CN -> RS -> CN ; +-- The construction of numerals is defined in [Numeral Numeral.html]. - SentCN : CN -> S -> CN ; - QuestCN : CN -> QS -> CN ; +-- $Num$ can be modified by certain adverbs. - UseN : N -> CN ; + AdNum : AdN -> Num -> Num ; -- almost 51 + +-- $Ord$ consists of either digits or numeral words. + + OrdInt : Int -> Ord ; -- 51st + OrdNumeral : Numeral -> Ord ; -- fifty-first + +-- Superlative forms of adjectives behave syntactically in the same way as +-- ordinals. + + OrdSuperl : A -> Ord ; -- largest + +-- Definite and indefinite constructions are sometimes realized as +-- neatly distinct words (Spanish "un, unos ; el, los") but also without +-- any particular word (Finnish; Swedish definites). + + DefSg : QuantSg ; -- the (house) + DefPl : QuantPl ; -- the (houses) + IndefSg : QuantSg ; -- a (house) + IndefPl : QuantPl ; -- (houses) + +-- Nouns can be used without an article as mass nouns. The resource does +-- not distinguish mass nouns from other common nouns, which can result +-- in semantically odd expressions. + + MassDet : QuantSg ; -- (beer) + +-- Other determiners are defined in [Structural Structural.html]. + + + +--2 Common nouns + +-- Simple nouns can be used as nouns outright. + + UseN : N -> CN ; -- house + +-- Relational nouns take one or two arguments. + + ComplN2 : N2 -> NP -> CN ; -- son of the king + ComplN3 : N3 -> NP -> N2 ; -- flight from Moscow (to Paris) + +-- Relational nouns can also be used without their arguments. +-- The semantics is typically derivative of the relational meaning. + + UseN2 : N2 -> CN ; -- son + UseN3 : N3 -> CN ; -- flight + +-- Nouns can be modified by adjectives and relative clauses. + + AdjCN : AP -> CN -> CN ; -- big house + RelCN : CN -> RS -> CN ; -- house that John owns + +-- Nouns can also be modified by embedded sentences and questions. +-- For some nouns this makes little sense, but we leave this for applications +-- to decide. + + SentCN : CN -> S -> CN ; -- fact that John smokes + QuestCN : CN -> QS -> CN ; -- question whether John smokes } ; diff --git a/lib/resource-1.0/abstract/Structural.gf b/lib/resource-1.0/abstract/Structural.gf index 3f49e049a..b8bdeff65 100644 --- a/lib/resource-1.0/abstract/Structural.gf +++ b/lib/resource-1.0/abstract/Structural.gf @@ -74,20 +74,20 @@ abstract Structural = Cat ** { somebody_NP : NP ; something_NP : NP ; somewhere_Adv : Adv ; - that_Quant : Quant ; -- Det + that_Quant : QuantSg ; -- Det that_NP : NP ; there_Adv : Adv ; -- there7to_Adv : Adv ; -- there7from_Adv : Adv ; -- therefore_PConj : PConj ; -- AdC these_NP : NP ; -- - these_Quant : Quant ; -- NDet + these_Quant : QuantPl ; -- NDet -- they8fem_NP : NP ; they_Pron : Pron ; -- NP - this_Quant : Quant ; -- NDet + this_Quant : QuantSg ; -- NDet this_NP : NP ; those_NP : NP ; -- - those_Quant : Quant ; -- NDet + those_Quant : QuantPl ; -- NDet thou_Pron : Pron ; -- NP through_Prep : Prep ; to_Prep : Prep ; diff --git a/lib/resource-1.0/doc/gfdoc/Adjective.html b/lib/resource-1.0/doc/gfdoc/Adjective.html new file mode 100644 index 000000000..b6a21f377 --- /dev/null +++ b/lib/resource-1.0/doc/gfdoc/Adjective.html @@ -0,0 +1,63 @@ + + + + + + + + +

+
+

+

+
+

+

+Author: +Last update: Tue Jan 10 16:38:50 2006 +

+

+Produced by +gfdoc - a rudimentary GF document generator. +(c) Aarne Ranta (aarne@cs.chalmers.se) 2002 under GNU GPL. +

+

+== +

+
+    abstract Adjective = Cat ** {
+    
+      fun
+    
+        PositA  : A -> AP ;
+        ComparA : A -> NP -> AP ;
+
+

+

+SuperlA belongs to determiner syntax in Noun. +

+
+        ComplA2 : A2 -> NP -> AP ;
+    
+        ReflA2  : A2 -> AP ;
+    
+        SentAP  : AP -> S  -> AP ;
+        QuestAP : AP -> QS -> AP ;
+    
+        AdAP : AdA -> AP -> AP ;
+
+

+

+AdvA that forms adverbs belongs to Adverb. +Elliptic constructions as usual. +

+
+        UseA2 : A2 -> A ;
+    
+    }
+
+

+ + + + diff --git a/lib/resource-1.0/doc/gfdoc/Adverb.html b/lib/resource-1.0/doc/gfdoc/Adverb.html new file mode 100644 index 000000000..97f0d0031 --- /dev/null +++ b/lib/resource-1.0/doc/gfdoc/Adverb.html @@ -0,0 +1,51 @@ + + + + + + + + +

+
+

+

+
+

+

+Author: +Last update: Tue Jan 10 16:38:50 2006 +

+

+Produced by +gfdoc - a rudimentary GF document generator. +(c) Aarne Ranta (aarne@cs.chalmers.se) 2002 under GNU GPL. +

+

+== +

+
+    abstract Adverb = Cat ** {
+    
+      fun
+    
+        PositAdvAdj   : A -> Adv ;
+        ComparAdvAdj  : CAdv -> A -> NP -> Adv ;
+        ComparAdvAdjS : CAdv -> A -> S -> Adv ;
+    
+        PrepNP : Prep -> NP -> Adv ;
+    
+        AdAdv  : AdA -> Adv -> Adv ;
+    
+        SubjS : Subj -> S -> Adv ;
+        AdvSC : SC -> Adv ;
+    
+        AdnCAdv : CAdv -> AdN ;
+    
+    }
+
+

+ + + + diff --git a/lib/resource-1.0/doc/gfdoc/Basic.html b/lib/resource-1.0/doc/gfdoc/Basic.html new file mode 100644 index 000000000..2dac04153 --- /dev/null +++ b/lib/resource-1.0/doc/gfdoc/Basic.html @@ -0,0 +1,256 @@ + + + + + + + + +

+
+

+

+
+

+

+Author: +Last update: Tue Jan 10 16:38:50 2006 +

+

+Produced by +gfdoc - a rudimentary GF document generator. +(c) Aarne Ranta (aarne@cs.chalmers.se) 2002 under GNU GPL. +

+

+== +

+
+    abstract Basic = Cat ** {
+      fun
+      airplane_N : N ;
+      answer_V2S : V2 ;
+      apartment_N : N ;
+      apple_N : N ;
+      art_N : N ;
+      ask_V2Q : V2 ;
+      baby_N : N ;
+      bad_A : A ;
+      bank_N : N ;
+      beautiful_A : A ;
+      become_VA : VA ;
+      beer_N : N ;
+      beg_V2V : V2 ;
+      big_A : A ;
+      bike_N : N ;
+      bird_N : N ;
+      black_A : A ;
+      blue_A : A ;
+      boat_N : N ;
+      book_N : N ;
+      boot_N : N ;
+      boss_N : N ;
+      boy_N : N ;
+      bread_N : N ;
+      break_V2 : V2 ;
+      broad_A : A ;
+      brother_N2 : N2 ;
+      brown_A : A ;
+      butter_N : N ;
+      buy_V2 : V2 ;
+      camera_N : N ;
+      cap_N : N ;
+      car_N : N ;
+      carpet_N : N ;
+      cat_N : N ;
+      ceiling_N : N ;
+      chair_N : N ;
+      cheese_N : N ;
+      child_N : N ;
+      church_N : N ;
+      city_N : N ;
+      clean_A : A ;
+      clever_A : A ;
+      close_V2 : V2 ;
+      coat_N : N ;
+      cold_A : A ;
+      come_V : V ;
+      computer_N : N ;
+      country_N : N ;
+      cousin_N : N ;
+      cow_N : N ;
+      die_V : V ;
+      dirty_A : A ;
+      distance_N3 : N3 ;
+      doctor_N : N ;
+      dog_N : N ;
+      door_N : N ;
+      drink_V2 : V2 ;
+      easy_A2V : A2 ;
+      eat_V2 : V2 ;
+      enemy_N : N ;
+      empty_A : A ;
+      factory_N : N ;
+      father_N2 : N2 ;
+      fear_VS : VS ;
+      find_V2 : V2 ;
+      fish_N : N ;
+      floor_N : N ;
+      forget_V2 : V2 ;
+      fridge_N : N ;
+      friend_N : N ;
+      fruit_N : N ;
+      fun_AV : A ;
+      garden_N : N ;
+      girl_N : N ;
+      glove_N : N ;
+      gold_N : N ;
+      good_A : A ;
+      go_V : V ;
+      green_A : A ;
+      harbour_N : N ;
+      hate_V2 : V2 ;
+      hat_N : N ;
+      have_V2 : V2 ;
+      hear_V2 : V2 ;
+      hill_N : N ;
+      hope_VS : VS ;
+      horse_N : N ;
+      hot_A : A ;
+      house_N : N ;
+      important_A : A ;
+      industry_N : N ;
+      iron_N : N ;
+      king_N : N ;
+      know_V2 : V2 ;
+      lake_N : N ;
+      lamp_N : N ;
+      learn_V2 : V2 ;
+      leather_N : N ;
+      leave_V2 : V2 ;
+      like_V2 : V2 ;
+      listen_V2 : V2 ;
+      live_V : V ;
+      long_A : A ;
+      lose_V2 : V2 ;
+      love_N : N ;
+      love_V2 : V2 ;
+      man_N : N ;
+      married_A2 : A2 ;
+      meat_N : N ;
+      milk_N : N ;
+      moon_N : N ;
+      mother_N2 : N2 ;
+      mountain_N : N ;
+      music_N : N ;
+      narrow_A : A ;
+      new_A : A ;
+      newspaper_N : N ;
+      oil_N : N ;
+      old_A : A ;
+      open_V2 : V2 ;
+      paint_V2A : V2A ;
+      paper_N : N ;
+      peace_N : N ;
+      pen_N : N ;
+      planet_N : N ;
+      plastic_N : N ;
+      play_V2 : V2 ;
+      policeman_N : N ;
+      priest_N : N ;
+      probable_AS : A ;
+      queen_N : N ;
+      radio_N : N ;
+      rain_V0 : V ;
+      read_V2 : V2 ;
+      red_A : A ;
+      religion_N : N ;
+      restaurant_N : N ;
+      river_N : N ;
+      rock_N : N ;
+      roof_N : N ;
+      rubber_N : N ;
+      run_V : V ;
+      say_VS : VS ;
+      school_N : N ;
+      science_N : N ;
+      sea_N : N ;
+      seek_V2 : V2 ;
+      see_V2 : V2 ;
+      sell_V3 : V3 ;
+      send_V3 : V3 ;
+      sheep_N : N ;
+      ship_N : N ;
+      shirt_N : N ;
+      shoe_N : N ;
+      shop_N : N ;
+      short_A : A ;
+      silver_N : N ;
+      sister_N : N ;
+      sleep_V : V ;
+      small_A : A ;
+      snake_N : N ;
+      sock_N : N ;
+      speak_V2 : V2 ;
+      star_N : N ;
+      steel_N : N ;
+      stone_N : N ;
+      stove_N : N ;
+      student_N : N ;
+      stupid_A : A ;
+      sun_N : N ;
+      switch8off_V2 : V2 ;
+      switch8on_V2 : V2 ;
+      table_N : N ;
+      talk_V3 : V3 ;
+      teacher_N : N ;
+      teach_V2 : V2 ;
+      television_N : N ;
+      thick_A : A ;
+      thin_A : A ;
+      train_N : N ;
+      travel_V : V ;
+      tree_N : N ;
+
+

+

+-- trousers_N : N ; +

+
+      ugly_A : A ;
+      understand_V2 : V2 ;
+      university_N : N ;
+      village_N : N ;
+      wait_V2 : V2 ;
+      walk_V : V ;
+      warm_A : A ;
+      war_N : N ;
+      watch_V2 : V2 ;
+      water_N : N ;
+      white_A : A ;
+      window_N : N ;
+      wine_N : N ;
+      win_V2 : V2 ;
+      woman_N : N ;
+      wonder_VQ : VQ ;
+      wood_N : N ;
+      write_V2 : V2 ;
+      yellow_A : A ;
+      young_A : A ;
+    
+      do_V2 : V2 ;
+      now_Adv : Adv ;
+      already_Adv : Adv ;
+      song_N : N ;
+      add_V3 : V3 ;
+      number_N : N ;
+      put_V2 : V2 ;
+      stop_V : V ;
+      jump_V : V ;
+    
+    }
+
+

+ + + + diff --git a/lib/resource-1.0/doc/gfdoc/Cat.html b/lib/resource-1.0/doc/gfdoc/Cat.html new file mode 100644 index 000000000..04096a603 --- /dev/null +++ b/lib/resource-1.0/doc/gfdoc/Cat.html @@ -0,0 +1,218 @@ + + + + + The category system + +

The category system

+ +Author:
+Last update: Tue Jan 10 16:38:50 2006 +
+ +

+
+

+ + +

+
+

+

+Produced by +gfdoc - a rudimentary GF document generator. +(c) Aarne Ranta (aarne@cs.chalmers.se) 2002 under GNU GPL. +

+ +

The category system

+
+    abstract Cat = {
+    
+      cat
+
+

+ +

Top-level units

+

+Constructed in Phrase. +

+
+        Text ;  -- text consisting of several phrases
+        Phr ;   -- phrase in a text                    e.g. "But be quiet my darling."
+        Utt ;   -- sentence, question, word...         e.g. "be quiet"
+        Voc ;   -- vocative or "please"                e.g. "my darling"
+
+

+ +

Tensed sentences

+

+Constructed in Tensed. +A simplified variant, with just present forms, is Untensed. +

+
+        S ;     -- declarative sentence                e.g. "she lived here"
+        QS ;    -- question                            e.g. "where did she live"
+        RS ;    -- relative                            e.g. "in which she lived"
+
+

+ +

Clauses

+

+Constructed in Sentence. +

+
+        Cl ;    -- declarative clause, with all tenses e.g. "she looks at this"
+        Slash ; -- clause missing NP (S/NP in GPSG)    e.g. "she looks at"
+        Imp ;   -- imperative                          e.g. "look at this"
+
+

+ +

Questions and interrogatives

+

+Constructed in Question. +

+
+        QCl ;   -- question clause, with all tenses    e.g. "why does she walk"
+        IP ;    -- interrogative pronoun               e.g. "who"
+        IAdv ;  -- interrogative adverb                e.g. "why"
+        IDet ;  -- interrogative determiner            e.g. "which"
+
+

+ +

Relative clauses and pronouns

+

+Constructed in Relative. +

+
+        RCl ;   -- relative clause, with all tenses    e.g. "in which she lives"
+        RP ;    -- relative pronoun                    e.g. "in which"
+
+

+ +

Verb phrases

+

+Constructed in Verb. +

+
+        VP ;    -- verb phrase                         e.g. "is very warm"
+        Comp ;  -- complement of copula, such as AP    e.g. "very warm"
+        SC ;    -- embedded sentence or question       e.g. "that it rains"
+
+

+ +

Adjectival phrases

+

+Constructed in Adjective. +

+
+        AP ;    -- adjectival phrase                   e.g. "very warm"
+
+

+ +

Nouns and noun phrases

+

+Constructed in Noun. +Many atomic noun phrases e.g. everybody +are constructed in Structural. +The determiner structure is +

+
+  Predet (QuantSg | QuantPl Num) Ord
+
+

+as defined in Noun. +

+
+        CN ;    -- common noun (without determiner)    e.g. "red house"
+        NP ;    -- noun phrase (subject or object)     e.g. "the red house"
+        Pron ;  -- personal pronoun                    e.g. "she"
+        Det ;   -- determiner phrase                   e.g. "all the seven"
+        Predet; -- predeterminer (prefixed Quant)      e.g. "all"
+        QuantSg;-- quantifier ('nucleus' of sing. Det) e.g. "this"
+        QuantPl;-- quantifier ('nucleus' of plur. Det) e.g. "these"
+        Num ;   -- cardinal number (used with QuantPl) e.g. "seven"
+        Ord ;   -- ordinal number (used in Det)        e.g. "seventh"
+
+

+ +

Adverbs

+

+Constructed in Adverb. +Many adverbs are constructed in Structural. +

+
+        Adv ;   -- verb-phrase-modifying adverb,       e.g. "in the house"
+        AdV ;   -- adverb directly attached to verb    e.g. "always"
+        AdA ;   -- adjective-modifying adverb,         e.g. "very"
+        AdN ;   -- numeral-modifying adverb,           e.g. "more than"
+
+

+ +

Numerals

+

+Constructed in Numeral. +

+
+        Numeral;-- cardinal or ordinal,                e.g. "five/fifth"
+
+

+ +

Structural words

+

+Constructed in Structural. +

+
+        Conj ;  -- conjunction,                        e.g. "and"
+        DConj ; -- distributed conj.                   e.g. "both - and"
+        PConj ; -- phrase-beginning conj.              e.g. "therefore"
+        CAdv ;  -- comparative adverb                  e.g. "more"
+        Subj ;  -- subjunction,                        e.g. "if"
+        Prep ;  -- preposition, or just case           e.g. "in"
+
+

+ +

Words of open classes

+

+These are constructed in Basic and in additional lexicon modules. +

+
+        V ;     -- one-place verb                      e.g. "sleep" 
+        V2 ;    -- two-place verb                      e.g. "love"
+        V3 ;    -- three-place verb                    e.g. "show"
+        VV ;    -- verb-phrase-complement verb         e.g. "want"
+        VS ;    -- sentence-complement verb            e.g. "claim"
+        VQ ;    -- question-complement verb            e.g. "ask"
+        VA ;    -- adjective-complement verb           e.g. "look"
+        V2A ;   -- verb with NP and AP complement      e.g. "paint"
+    
+        A ;     -- one-place adjective                 e.g. "warm"
+        A2 ;    -- two-place adjective                 e.g. "divisible"
+    
+        N ;     -- common noun                         e.g. "house"
+        N2 ;    -- relational noun                     e.g. "son"
+        N3 ;    -- three-place relational noun         e.g. "connection"
+        PN ;    -- proper name                         e.g. "Paris"
+    
+    }
+
+

+ + + + diff --git a/lib/resource-1.0/doc/gfdoc/Conjunction.html b/lib/resource-1.0/doc/gfdoc/Conjunction.html new file mode 100644 index 000000000..b2b7f5498 --- /dev/null +++ b/lib/resource-1.0/doc/gfdoc/Conjunction.html @@ -0,0 +1,59 @@ + + + + + + + + +

+
+

+

+
+

+

+Author: +Last update: Tue Jan 10 16:38:50 2006 +

+

+Produced by +gfdoc - a rudimentary GF document generator. +(c) Aarne Ranta (aarne@cs.chalmers.se) 2002 under GNU GPL. +

+

+== +

+
+    abstract Conjunction = Cat ** {
+    
+      fun
+    
+        ConjS    : Conj -> [S] -> S ;         -- "John walks and Mary runs"
+        ConjAP   : Conj -> [AP] -> AP ;       -- "even and prime"
+        ConjNP   : Conj -> [NP] -> NP ;       -- "John or Mary"
+        ConjAdv  : Conj -> [Adv] -> Adv ;     -- "quickly or slowly"
+    
+        DConjS   : DConj -> [S] -> S ;        -- "either John walks or Mary runs"
+        DConjAP  : DConj -> [AP] -> AP ;      -- "both even and prime"
+        DConjNP  : DConj -> [NP] -> NP ;      -- "either John or Mary"
+        DConjAdv : DConj -> [Adv] -> Adv ;    -- "both badly and slowly"
+
+

+

+These categories are internal to this module. +

+
+      cat
+        [S]{2} ; 
+        [Adv]{2} ; 
+        [NP]{2} ; 
+        [AP]{2} ;
+    
+    }
+
+

+ + + + diff --git a/lib/resource-1.0/doc/gfdoc/Lang.html b/lib/resource-1.0/doc/gfdoc/Lang.html new file mode 100644 index 000000000..70cd6621b --- /dev/null +++ b/lib/resource-1.0/doc/gfdoc/Lang.html @@ -0,0 +1,48 @@ + + + + + + + + +

+
+

+

+
+

+

+Author: +Last update: Tue Jan 10 16:38:50 2006 +

+

+Produced by +gfdoc - a rudimentary GF document generator. +(c) Aarne Ranta (aarne@cs.chalmers.se) 2002 under GNU GPL. +

+

+== +

+
+    abstract Lang = 
+      Noun,
+      Verb, 
+      Adjective,
+      Adverb,
+      Numeral,
+      Sentence, 
+      Question,
+      Relative,
+      Conjunction,
+      Phrase,
+      Tensed,
+      Structural,
+      Basic
+      ** {} ;
+
+

+ + + + diff --git a/lib/resource-1.0/doc/gfdoc/Lex.html b/lib/resource-1.0/doc/gfdoc/Lex.html new file mode 100644 index 000000000..005842239 --- /dev/null +++ b/lib/resource-1.0/doc/gfdoc/Lex.html @@ -0,0 +1,89 @@ + + + + + + + + +

+
+

+

+
+

+

+Author: +Last update: Tue Jan 10 16:38:50 2006 +

+

+Produced by +gfdoc - a rudimentary GF document generator. +(c) Aarne Ranta (aarne@cs.chalmers.se) 2002 under GNU GPL. +

+

+== +

+
+    abstract Lex = Cat ** {
+    
+      fun
+        walk_V  : V ;
+        help_V2 : V2 ;
+        show_V3 : V3 ;
+        want_VV : VV ;
+        claim_VS : VS ;
+        ask_VQ : VQ ;
+    
+        dog_N : N ;
+        son_N2 : N2 ;
+        way_N3 : N3 ;
+    
+        warm_A : A ;
+        close_A2 : A2 ;
+
+

+

+structural +

+
+        only_Predet, all_Predet : Predet ;
+    
+        this_Quant : QuantSg ;
+        these_Quant : QuantPl ;
+    
+        i_Pron, he_Pron, we_Pron : Pron ;
+    
+        whoSg_IP, whoPl_IP : IP ;
+    
+        when_IAdv, where_IAdv, why_IAdv : IAdv ;
+    
+        whichSg_IDet, whichPl_IDet : IDet ;
+    
+        here_Adv : Adv ;
+    
+        very_AdA : AdA ;
+    
+        always_AdV : AdV ;
+    
+        one_Numeral, forty_Numeral : Numeral ;
+    
+        in_Prep, of_Prep : Prep ;
+    
+        and_Conj : Conj ;
+        either7or_DConj : DConj ;
+    
+        but_PConj : PConj ;
+    
+        if_Subj, because_Subj : Subj ;
+    
+        please_Voc : Voc ;
+    
+        more_CAdv, less_CAdv : CAdv ;
+    }
+
+

+ + + + diff --git a/lib/resource-1.0/doc/gfdoc/ListConjunction.html b/lib/resource-1.0/doc/gfdoc/ListConjunction.html new file mode 100644 index 000000000..7f0c5403f --- /dev/null +++ b/lib/resource-1.0/doc/gfdoc/ListConjunction.html @@ -0,0 +1,59 @@ + + + + + + + + +

+
+

+

+
+

+

+Author: +Last update: Tue Jan 10 16:38:51 2006 +

+

+Produced by +gfdoc - a rudimentary GF document generator. +(c) Aarne Ranta (aarne@cs.chalmers.se) 2002 under GNU GPL. +

+

+== +

+
+    abstract ListConjunction = Cat ** {
+    
+      fun
+    
+        ConjS    : Conj -> [S] -> S ;         -- "John walks and Mary runs"
+        ConjAP   : Conj -> [AP] -> AP ;       -- "even and prime"
+        ConjNP   : Conj -> [NP] -> NP ;       -- "John or Mary"
+        ConjAdv  : Conj -> [Adv] -> Adv ;     -- "quickly or slowly"
+    
+        DConjS   : DConj -> [S] -> S ;        -- "either John walks or Mary runs"
+        DConjAP  : DConj -> [AP] -> AP ;      -- "both even and prime"
+        DConjNP  : DConj -> [NP] -> NP ;      -- "either John or Mary"
+        DConjAdv : DConj -> [Adv] -> Adv ;    -- "both badly and slowly"
+
+

+

+These categories are internal to this module. +

+
+      cat
+        [S]{2} ; 
+        [Adv]{2} ; 
+        [NP]{2} ; 
+        [AP]{2} ;
+    
+    }
+
+

+ + + + diff --git a/lib/resource-1.0/doc/gfdoc/Math.html b/lib/resource-1.0/doc/gfdoc/Math.html new file mode 100644 index 000000000..fe0be55e3 --- /dev/null +++ b/lib/resource-1.0/doc/gfdoc/Math.html @@ -0,0 +1,68 @@ + + + + + + + + +

+
+

+ + +

+
+

+

+Author: +Last update: Tue Jan 10 16:38:51 2006 +

+

+Produced by +gfdoc - a rudimentary GF document generator. +(c) Aarne Ranta (aarne@cs.chalmers.se) 2002 under GNU GPL. +

+

+== +

+
+    abstract Math = Cat ** {
+
+

+ +

Noun phrases with symbols

+
+    fun
+    
+      SymbPN      : Symb -> PN ;                -- "x"
+      IntPN       : Int -> PN ;                 -- "27"
+      CNIntNP     : CN -> Int -> NP ;           -- "level 53"
+      CNSymbNP    : Det -> CN -> [Symb] -> NP ; -- "(the) (2) numbers x and y"
+
+

+ +

Symbol lists

+

+A symbol list has at least two elements. The last two are separated +by a conjunction (and in English), the others by commas. +This produces x, y and z, in English. +

+
+    cat
+      Symb ;
+      [Symb]{2} ;
+    
+    fun
+      MkSymb : String -> Symb ;
+    
+    }
+
+

+ + + + diff --git a/lib/resource-1.0/doc/gfdoc/Noun.html b/lib/resource-1.0/doc/gfdoc/Noun.html new file mode 100644 index 000000000..f5916c581 --- /dev/null +++ b/lib/resource-1.0/doc/gfdoc/Noun.html @@ -0,0 +1,201 @@ + + + + + The construction of nouns, noun phrases, and determiners + +

The construction of nouns, noun phrases, and determiners

+ +Author:
+Last update: Tue Jan 10 16:38:51 2006 +
+ +

+
+

+ + +

+
+

+

+Produced by +gfdoc - a rudimentary GF document generator. +(c) Aarne Ranta (aarne@cs.chalmers.se) 2002 under GNU GPL. +

+ +

The construction of nouns, noun phrases, and determiners

+
+    abstract Noun = Cat ** {
+    
+      fun
+
+

+ +

Noun phrases

+

+The three main types of noun phrases are +

+ + +
+        DetCN   : Det -> CN -> NP ;   -- the man
+        UsePN   : PN -> NP ;          -- John
+        UsePron : Pron -> NP ;        -- he
+
+

+

+Pronouns are given in the module Structural. +

+ +

Determiners

+

+The determiner has a fine-grained structure, in which four +different optional parts can be discerned. The noun phrase +all my first forty books shows each of these parts. +The cardinal numeral is only available for plural determiners. +(This is modified from CLE by further dividing their Num into +cardinal and ordinal.) +

+
+        DetSg : Predet -> QuantSg ->        Ord -> Det ;
+        DetPl : Predet -> QuantPl -> Num -> Ord -> Det ;
+
+

+

+Pronouns have possessive forms. Genitives of other kinds +of noun phrases are not given here, since they are not possible +in e.g. Romance languages. +

+
+        PossSg : Pron -> QuantSg ;    -- my (house)
+        PossPl : Pron -> QuantPl ;    -- my (houses)
+
+

+

+All parts of the determiner can be empty, except Quant, which is +the kernel of a determiner. +

+
+        NoPredet : Predet ;
+        NoNum    : Num ;
+        NoOrd    : Ord ;
+
+

+

+Num consists of either digits or numeral words. +

+
+        NumInt     : Int -> Num ;     -- 51
+        NumNumeral : Numeral -> Num ; -- fifty-one
+
+

+

+The construction of numerals is defined in Numeral. +Num can be modified by certain adverbs. +

+
+        AdNum : AdN -> Num -> Num ;   -- almost 51
+
+

+

+Ord consists of either digits or numeral words. +

+
+        OrdInt     : Int -> Ord ;     -- 51st
+        OrdNumeral : Numeral -> Ord ; -- fifty-first
+
+

+

+Superlative forms of adjectives behave syntactically in the same way as +ordinals. +

+
+        OrdSuperl : A -> Ord ;        -- largest
+
+

+

+Definite and indefinite constructions are sometimes realized as +neatly distinct words (Spanish un, unos ; el, los) but also without +any particular word (Finnish; Swedish definites). +

+
+        DefSg   : QuantSg ;           -- the (house)
+        DefPl   : QuantPl ;           -- the (houses)
+        IndefSg : QuantSg ;           -- a (house)
+        IndefPl : QuantPl ;           -- (houses)
+
+

+

+Nouns can be used without an article as mass nouns. The resource does +not distinguish mass nouns from other common nouns, which can result +in semantically odd expressions. +

+
+        MassDet : QuantSg ;           -- (beer)
+
+

+

+Other determiners are defined in Structural. +

+ +

Common nouns

+

+Simple nouns can be used as nouns outright. +

+
+        UseN : N -> CN ;              -- house
+
+

+

+Relational nouns take one or two arguments. +

+
+        ComplN2 : N2 -> NP -> CN ;    -- son of the king
+        ComplN3 : N3 -> NP -> N2 ;    -- flight from Moscow (to Paris)
+
+

+

+Relational nouns can also be used without their arguments. +The semantics is typically derivative of the relational meaning. +

+
+        UseN2 : N2 -> CN ;            -- son
+        UseN3 : N3 -> CN ;            -- flight
+
+

+

+Nouns can be modified by adjectives and relative clauses. +

+
+        AdjCN   : AP -> CN -> CN ;    -- big house
+        RelCN   : CN -> RS -> CN ;    -- house that John owns
+
+

+

+Nouns can also be modified by embedded sentences and questions. +For some nouns this makes little sense, but we leave this for applications +to decide. +

+
+        SentCN  : CN -> S  -> CN ;    -- fact that John smokes
+        QuestCN : CN -> QS -> CN ;    -- question whether John smokes
+    
+    } ;
+
+

+ + + + diff --git a/lib/resource-1.0/doc/gfdoc/Numeral.html b/lib/resource-1.0/doc/gfdoc/Numeral.html new file mode 100644 index 000000000..c8a1fb640 --- /dev/null +++ b/lib/resource-1.0/doc/gfdoc/Numeral.html @@ -0,0 +1,65 @@ + + + + + + + + +

+
+

+

+
+

+

+Author: +Last update: Tue Jan 10 16:38:51 2006 +

+

+Produced by +gfdoc - a rudimentary GF document generator. +(c) Aarne Ranta (aarne@cs.chalmers.se) 2002 under GNU GPL. +

+

+== +

+

+numerals from 1 to 999999 in decimal notation +

+
+    abstract Numeral = Cat ** {
+    
+    cat 
+      Digit ;       -- 2..9
+      Sub10 ;       -- 1..9
+      Sub100 ;      -- 1..99
+      Sub1000 ;     -- 1..999
+      Sub1000000 ;  -- 1..999999
+    
+    fun 
+      num : Sub1000000 -> Numeral ;
+    
+      n2, n3, n4, n5, n6, n7, n8, n9 : Digit ;
+    
+      pot01 : Sub10 ;                               -- 1
+      pot0 : Digit -> Sub10 ;                       -- d * 1
+      pot110 : Sub100 ;                             -- 10
+      pot111 : Sub100 ;                             -- 11
+      pot1to19 : Digit -> Sub100 ;                  -- 10 + d
+      pot0as1 : Sub10 -> Sub100 ;                   -- coercion of 1..9
+      pot1 : Digit -> Sub100 ;                      -- d * 10
+      pot1plus : Digit -> Sub10 -> Sub100 ;         -- d * 10 + n
+      pot1as2 : Sub100 -> Sub1000 ;                 -- coercion of 1..99
+      pot2 : Sub10 -> Sub1000 ;                     -- m * 100
+      pot2plus : Sub10 -> Sub100 -> Sub1000 ;       -- m * 100 + n
+      pot2as3 : Sub1000 -> Sub1000000 ;             -- coercion of 1..999
+      pot3 : Sub1000 -> Sub1000000 ;                -- m * 1000
+      pot3plus : Sub1000 -> Sub1000 -> Sub1000000 ; -- m * 1000 + n
+    }
+
+

+ + + + diff --git a/lib/resource-1.0/doc/gfdoc/ParadigmsDut.html b/lib/resource-1.0/doc/gfdoc/ParadigmsDut.html new file mode 100644 index 000000000..f645c42b0 --- /dev/null +++ b/lib/resource-1.0/doc/gfdoc/ParadigmsDut.html @@ -0,0 +1,595 @@ + + + + + + + + +

+
+

+

+
+

+

+Author: +Last update: Tue Jan 10 16:38:53 2006 +

+

+Produced by +gfdoc - a rudimentary GF document generator. +(c) Aarne Ranta (aarne@cs.chalmers.se) 2002 under GNU GPL. +

+

+== +

+

+--# -path=.:../abstract:../../prelude +

+

+--1 Dutlish Lexical Paradigms +-- +-- Aarne Ranta 2003--2005 +-- +-- This is an API to the user of the resource grammar +-- for adding lexical items. It gives functions for forming +-- expressions of open categories: nouns, adjectives, verbs. +-- +-- Closed categories (determiners, pronouns, conjunctions) are +-- accessed through the resource syntax API, Structural.gf. +-- +-- The main difference with MorphoDut.gf is that the types +-- referred to are compiled resource grammar types. We have moreover +-- had the design principle of always having existing forms, rather +-- than stems, as string arguments of the paradigms. +-- +-- The structure of functions for each word class C is the following: +-- first we give a handful of patterns that aim to cover all +-- regular cases. Then we give a worst-case function mkC, which serves as an +-- escape to construct the most irregular words of type C. +-- However, this function should only seldom be needed: we have a +-- separate module IrregularDut, which covers all irregularly inflected +-- words. +-- +-- The following modules are presupposed: +

+

+resource ParadigmsDut = open +(Predef=Predef), +Prelude, +MorphoDut, +CatDut +in { +--2 Parameters +-- +-- To abstract over gender names, we define the following identifiers. +

+

+oper +Gender : Type ; +

+

+human : Gender ; +nonhuman : Gender ; +masculine : Gender ; +feminite : Gender ; +

+

+-- To abstract over number names, we define the following. +

+

+Number : Type ; +

+

+singular : Number ; +plural : Number ; +

+

+-- To abstract over case names, we define the following. +

+

+Case : Type ; +

+

+nominative : Case ; +genitive : Case ; +

+

+-- Prepositions are used in many-argument functions for rection. +

+

+Preposition : Type ; +

+

+--2 Nouns +

+

+-- Worst case: give all four forms and the semantic gender. +

+

+mkN : (man,men,man's,men's : Str) -> N ; +

+

+-- The regular function captures the variants for nouns ending with +-- s,sh,x,z or y: kiss - kisses, flash - flashes; +-- fly - flies (but toy - toys), +

+

+regN : Str -> N ; +

+

+-- In practice the worst case is just: give singular and plural nominative. +

+

+mk2N : (man,men : Str) -> N ; +

+

+-- All nouns created by the previous functions are marked as +-- nonhuman. If you want a human noun, wrap it with the following +-- function: +

+

+genderN : Gender -> N -> N ; +

+

+--3 Compound nouns +-- +-- All the functions above work quite as well to form compound nouns, +-- such as baby boom. +

+

+--3 Relational nouns +-- +-- Relational nouns (daughter of x) need a preposition. +

+

+mkN2 : N -> Preposition -> N2 ; +

+

+-- The most common preposition is of, and the following is a +-- shortcut for regular, nonhuman relational nouns with of. +

+

+regN2 : Str -> N2 ; +

+

+-- Use the function mkPreposition or see the section on prepositions below to +-- form other prepositions. +-- +-- Three-place relational nouns (the connection from x to y) need two prepositions. +

+

+mkN3 : N -> Preposition -> Preposition -> N3 ; +

+

+--3 Relational common noun phrases +-- +-- In some cases, you may want to make a complex CN into a +-- relational noun (e.g. the old town hall of). +

+

+cnN2 : CN -> Preposition -> N2 ; +cnN3 : CN -> Preposition -> Preposition -> N3 ; +

+

+-- +--3 Proper names and noun phrases +-- +-- Proper names, with a regular genitive, are formed as follows +

+

+regPN : Str -> Gender -> PN ; -- John, John's +

+

+-- Sometimes you can reuse a common noun as a proper name, e.g. Bank. +

+

+nounPN : N -> PN ; +

+

+-- To form a noun phrase that can also be plural and have an irregular +-- genitive, you can use the worst-case function. +

+

+mkNP : Str -> Str -> Number -> Gender -> NP ; +

+

+--2 Adjectives +

+

+-- Non-comparison one-place adjectives need two forms: one for +-- the adjectival and one for the adverbial form (free - freely) +

+

+mkA : (free,freely : Str) -> A ; +

+

+-- For regular adjectives, the adverbial form is derived. This holds +-- even for cases with the variation happy - happily. +

+

+regA : Str -> A ; +

+

+--3 Two-place adjectives +-- +-- Two-place adjectives need a preposition for their second argument. +

+

+mkA2 : A -> Preposition -> A2 ; +

+

+-- Comparison adjectives may two more forms. +

+

+ADeg : Type ; +

+

+mkADeg : (good,better,best,well : Str) -> ADeg ; +

+

+-- The regular pattern recognizes two common variations: +-- -e (rude - ruder - rudest) and +-- -y (happy - happier - happiest - happily) +

+

+regADeg : Str -> ADeg ; -- long, longer, longest +

+

+-- However, the duplication of the final consonant is nor predicted, +-- but a separate pattern is used: +

+

+duplADeg : Str -> ADeg ; -- fat, fatter, fattest +

+

+-- If comparison is formed by more, //most, as in general for// +-- long adjective, the following pattern is used: +

+

+compoundADeg : A -> ADeg ; -- -/more/most ridiculous +

+

+-- From a given ADeg, it is possible to get back to A. +

+

+adegA : ADeg -> A ; +

+

+--2 Adverbs +

+

+-- Adverbs are not inflected. Most lexical ones have position +-- after the verb. Some can be preverbal (e.g. always). +

+

+mkAdv : Str -> Adv ; +mkAdV : Str -> AdV ; +

+

+-- Adverbs modifying adjectives and sentences can also be formed. +

+

+mkAdA : Str -> AdA ; +

+

+--2 Prepositions +-- +-- A preposition as used for rection in the lexicon, as well as to +-- build PPs in the resource API, just requires a string. +

+

+mkPreposition : Str -> Preposition ; +mkPrep : Str -> Prep ; +

+

+-- (These two functions are synonyms.) +

+

+--2 Verbs +-- +-- Except for be, the worst case needs five forms: the infinitive and +-- the third person singular present, the past indicative, and the +-- past and present participles. +

+

+mkV : (go, goes, went, gone, going : Str) -> V ; +

+

+-- The regular verb function recognizes the special cases where the last +-- character is y (cry - cries but buy - buys) or s, sh, x, z +-- (fix - fixes, etc). +

+

+regV : Str -> V ; +

+

+-- The following variant duplicates the last letter in the forms like +-- rip - ripped - ripping. +

+

+regDuplV : Str -> V ; +

+

+-- There is an extensive list of irregular verbs in the module IrregularDut. +-- In practice, it is enough to give three forms, +-- e.g. drink - drank - drunk, with a variant indicating consonant +-- duplication in the present participle. +

+

+irregV : (drink, drank, drunk : Str) -> V ; +irregDuplV : (get, got, gotten : Str) -> V ; +

+

+--3 Verbs with a particle. +-- +-- The particle, such as in switch on, is given as a string. +

+

+partV : V -> Str -> V ; +

+

+--3 Two-place verbs +-- +-- Two-place verbs need a preposition, except the special case with direct object. +-- (transitive verbs). Notice that a particle comes from the V. +

+

+mkV2 : V -> Preposition -> V2 ; +

+

+dirV2 : V -> V2 ; +

+

+--3 Three-place verbs +-- +-- Three-place (ditransitive) verbs need two prepositions, of which +-- the first one or both can be absent. +

+

+mkV3 : V -> Str -> Str -> V3 ; -- speak, with, about +dirV3 : V -> Str -> V3 ; -- give,_,to +dirdirV3 : V -> V3 ; -- give,_,_ +

+

+--3 Other complement patterns +-- +-- Verbs and adjectives can take complements such as sentences, +-- questions, verb phrases, and adjectives. +

+

+mkV0 : V -> V0 ; +mkVS : V -> VS ; +mkV2S : V -> Str -> V2S ; +mkVV : V -> VV ; +mkV2V : V -> Str -> Str -> V2V ; +mkVA : V -> VA ; +mkV2A : V -> Str -> V2A ; +mkVQ : V -> VQ ; +mkV2Q : V -> Str -> V2Q ; +

+

+mkAS : A -> AS ; +mkA2S : A -> Str -> A2S ; +mkAV : A -> AV ; +mkA2V : A -> Str -> A2V ; +

+

+-- Notice: categories V2S, V2V, V2A, V2Q are in v 1.0 treated +-- just as synonyms of V2, and the second argument is given +-- as an adverb. Likewise AS, A2S, AV, A2V are just A. +-- V0 is just V. +

+

+V0, V2S, V2V, V2A, V2Q : Type ; +AS, A2S, AV, A2V : Type ; +

+

+--2 Definitions of paradigms +-- +-- The definitions should not bother the user of the API. So they are +-- hidden from the document. +--. +

+

+Gender = MorphoDut.Gender ; +Number = MorphoDut.Number ; +Case = MorphoDut.Case ; +human = Masc ; +nonhuman = Neutr ; +masculine = Masc ; +feminine = Fem ; +singular = Sg ; +plural = Pl ; +nominative = Nom ; +genitive = Gen ; +

+

+Preposition = Str ; +

+

+regN = \ray -> +let +ra = Predef.tk 1 ray ; +y = Predef.dp 1 ray ; +r = Predef.tk 2 ray ; +ay = Predef.dp 2 ray ; +rays = +case y of { +y => y2ie ray s ; +s => ray + es ; +z => ray + es ; +x => ray + es ; +_ => case ay of { +sh => ray + es ; +ch => ray + es ; +_ => ray + s +} +} +in +mk2N ray rays ; +

+

+mk2N = \man,men -> +let mens = case last men of { +s => men + ' ; +_ => men + 's +} +in +mkN man men (man + 's) mens ; +

+

+mkN = \man,men,man's,men's -> +mkNoun man men man's men's **** {g = Neutr ; lock_N = <>} ; +

+

+genderN g man = {s = man.s ; g = g ; lock_N = <>} ; +

+

+mkN2 = \n,p -> n **** {lock_N2 = <> ; c2 = p} ; +regN2 n = mkN2 (regN n) (mkPreposition of) ; +mkN3 = \n,p,q -> n **** {lock_N3 = <> ; c2 = p ; c3 = q} ; +cnN2 = \n,p -> n **** {lock_N2 = <> ; c2 = p} ; +cnN3 = \n,p,q -> n **** {lock_N3 = <> ; c2 = p ; c3 = q} ; +

+

+regPN n g = nameReg n g **** {lock_PN = <>} ; +nounPN n = {s = n.s ! singular ; g = n.g ; lock_PN = <>} ; +mkNP x y n g = {s = table {Gen => x ; _ => y} ; a = (agrP3 n).a ; +lock_NP = <>} ; +

+

+mkA a b = mkAdjective a a a b **** {lock_A = <>} ; +regA a = regAdjective a **** {lock_A = <>} ; +

+

+mkA2 a p = a **** {c2 = p ; lock_A2 = <>} ; +

+

+ADeg = A ; ---- +

+

+mkADeg a b c d = mkAdjective a b c d **** {lock_A = <>} ; +

+

+regADeg happy = +let +happ = init happy ; +y = last happy ; +happie = case y of { +y => happ + ie ; +e => happy ; +_ => happy + e +} ; +happily = case y of { +y => happ + ily ; +_ => happy + ly +} ; +in mkADeg happy (happie + r) (happie + st) happily ; +

+

+duplADeg fat = +mkADeg fat +(fat + last fat + er) (fat + last fat + est) (fat + ly) ; +

+

+compoundADeg a = +let ad = (a.s ! AAdj Posit) +in mkADeg ad (more ++ ad) (most ++ ad) (a.s ! AAdv) ; +

+

+adegA a = a ; +

+

+mkAdv x = ss x **** {lock_Adv = <>} ; +mkAdV x = ss x **** {lock_AdV = <>} ; +mkAdA x = ss x **** {lock_AdA = <>} ; +

+

+mkPreposition p = p ; +mkPrep p = ss p **** {lock_Prep = <>} ; +

+

+mkV a b c d e = mkVerbWorst a b c d e **** {s1 = [] ; lock_V = <>} ; +

+

+regV cry = +let +cr = init cry ; +y = last cry ; +cries = (regN cry).s ! Pl ! Nom ; -- ! +crie = init cries ; +cried = case last crie of { +e => crie + d ; +_ => crie + ed +} ; +crying = case y of { +e => case last cr of { +e => cry + ing ; +_ => cr + ing +} ; +_ => cry + ing +} +in mkV cry cries cried cried crying ; +

+

+regDuplV fit = +let fitt = fit + last fit in +mkV fit (fit + s) (fitt + ed) (fitt + ed) (fitt + ing) ; +

+

+irregV x y z = let reg = (regV x).s in +mkV x (reg ! VPres) y z (reg ! VPresPart) **** {s1 = [] ; lock_V = <>} ; +

+

+irregDuplV fit y z = +let +fitting = (regDuplV fit).s ! VPresPart +in +mkV fit (fit + s) y z fitting ; +

+

+partV v p = verbPart v p **** {lock_V = <>} ; +

+

+mkV2 v p = v **** {s = v.s ; s1 = v.s1 ; c2 = p ; lock_V2 = <>} ; +dirV2 v = mkV2 v [] ; +

+

+mkV3 v p q = v **** {s = v.s ; s1 = v.s1 ; c2 = p ; c3 = q ; lock_V3 = <>} ; +dirV3 v p = mkV3 v [] p ; +dirdirV3 v = dirV3 v [] ; +

+

+mkVS v = v **** {lock_VS = <>} ; +mkVV v = v **** {c2 = to ; lock_VV = <>} ; +mkVQ v = v **** {lock_VQ = <>} ; +

+

+V0 : Type = V ; +V2S, V2V, V2Q, V2A : Type = V2 ; +AS, A2S, AV : Type = A ; +A2V : Type = A2 ; +

+

+mkV0 v = v **** {lock_V = <>} ; +mkV2S v p = mkV2 v p **** {lock_V2 = <>} ; +mkV2V v p t = mkV2 v p **** {s4 = t ; lock_V2 = <>} ; +mkVA v = v **** {lock_VA = <>} ; +mkV2A v p = mkV2 v p **** {lock_V2A = <>} ; +mkV2Q v p = mkV2 v p **** {lock_V2 = <>} ; +

+

+mkAS v = v **** {lock_A = <>} ; +mkA2S v p = mkA2 v p **** {lock_A = <>} ; +mkAV v = v **** {lock_A = <>} ; +mkA2V v p = mkA2 v p **** {lock_A2 = <>} ; +

+

+} ; +

+ + + + diff --git a/lib/resource-1.0/doc/gfdoc/ParadigmsEng.html b/lib/resource-1.0/doc/gfdoc/ParadigmsEng.html new file mode 100644 index 000000000..5b2b7f232 --- /dev/null +++ b/lib/resource-1.0/doc/gfdoc/ParadigmsEng.html @@ -0,0 +1,459 @@ + + + + + + + + +

+
+

+ + +

+
+

+

+Author: +Last update: Tue Jan 10 16:38:53 2006 +

+

+Produced by +gfdoc - a rudimentary GF document generator. +(c) Aarne Ranta (aarne@cs.chalmers.se) 2002 under GNU GPL. +

+

+== +

+

+# -path=.:../abstract:../../prelude +

+ +

English Lexical Paradigms

+

+Aarne Ranta 2003--2005 +

+

+This is an API to the user of the resource grammar +for adding lexical items. It gives functions for forming +expressions of open categories: nouns, adjectives, verbs. +

+

+Closed categories (determiners, pronouns, conjunctions) are +accessed through the resource syntax API, Structural.gf. +

+

+The main difference with MorphoEng.gf is that the types +referred to are compiled resource grammar types. We have moreover +had the design principle of always having existing forms, rather +than stems, as string arguments of the paradigms. +

+

+The structure of functions for each word class C is the following: +first we give a handful of patterns that aim to cover all +regular cases. Then we give a worst-case function mkC, which serves as an +escape to construct the most irregular words of type C. +However, this function should only seldom be needed: we have a +separate module IrregularEng, which covers all irregularly inflected +words. +

+

+The following modules are presupposed: +

+
+    resource ParadigmsEng = open 
+      (Predef=Predef), 
+      Prelude, 
+      MorphoEng,
+      CatEng
+      in {
+
+

+ +

Parameters

+

+To abstract over gender names, we define the following identifiers. +

+
+    oper
+      Gender : Type ; 
+    
+      human     : Gender ;
+      nonhuman  : Gender ;
+      masculine : Gender ;
+      feminite  : Gender ;
+
+

+

+To abstract over number names, we define the following. +

+
+      Number : Type ; 
+    
+      singular : Number ;
+      plural   : Number ;
+
+

+

+To abstract over case names, we define the following. +

+
+      Case : Type ;
+    
+      nominative : Case ;
+      genitive   : Case ;
+
+

+

+Prepositions are used in many-argument functions for rection. +

+
+      Preposition : Type ;
+
+

+ +

Nouns

+

+Worst case: give all four forms and the semantic gender. +

+
+      mkN  : (man,men,man's,men's : Str) -> N ;
+
+

+

+The regular function captures the variants for nouns ending with +s,sh,x,z or y: kiss - kisses, flash - flashes; +fly - flies (but toy - toys), +

+
+      regN : Str -> N ;
+
+

+

+In practice the worst case is just: give singular and plural nominative. +

+
+      mk2N : (man,men : Str) -> N ;
+
+

+

+All nouns created by the previous functions are marked as +nonhuman. If you want a human noun, wrap it with the following +function: +

+
+      genderN : Gender -> N -> N ;
+
+

+ +

Compound nouns

+

+All the functions above work quite as well to form compound nouns, +such as baby boom. +

+ +

Relational nouns

+

+Relational nouns (daughter of x) need a preposition. +

+
+      mkN2 : N -> Preposition -> N2 ;
+
+

+

+The most common preposition is of, and the following is a +shortcut for regular, nonhuman relational nouns with of. +

+
+      regN2 : Str -> N2 ;
+
+

+

+Use the function mkPreposition or see the section on prepositions below to +form other prepositions. +

+

+Three-place relational nouns (the connection from x to y) need two prepositions. +

+
+      mkN3 : N -> Preposition -> Preposition -> N3 ;
+
+

+ +

Relational common noun phrases

+

+In some cases, you may want to make a complex CN into a +relational noun (e.g. the old town hall of). +

+
+      cnN2 : CN -> Preposition -> N2 ;
+      cnN3 : CN -> Preposition -> Preposition -> N3 ;
+
+

+ +

Proper names and noun phrases

+

+Proper names, with a regular genitive, are formed as follows +

+
+      regPN : Str -> Gender -> PN ;          -- John, John's
+
+

+

+Sometimes you can reuse a common noun as a proper name, e.g. Bank. +

+
+      nounPN : N -> PN ;
+
+

+

+To form a noun phrase that can also be plural and have an irregular +genitive, you can use the worst-case function. +

+
+      mkNP : Str -> Str -> Number -> Gender -> NP ; 
+
+

+ +

Adjectives

+

+Non-comparison one-place adjectives need two forms: one for +the adjectival and one for the adverbial form (free - freely) +

+
+      mkA : (free,freely : Str) -> A ;
+
+

+

+For regular adjectives, the adverbial form is derived. This holds +even for cases with the variation happy - happily. +

+
+      regA : Str -> A ;
+
+

+ +

Two-place adjectives

+

+Two-place adjectives need a preposition for their second argument. +

+
+      mkA2 : A -> Preposition -> A2 ;
+
+

+

+Comparison adjectives may two more forms. +

+
+      ADeg : Type ;
+    
+      mkADeg : (good,better,best,well : Str) -> ADeg ;
+
+

+

+The regular pattern recognizes two common variations: +-e (rude - ruder - rudest) and +-y (happy - happier - happiest - happily) +

+
+      regADeg : Str -> ADeg ;      -- long, longer, longest
+
+

+

+However, the duplication of the final consonant is nor predicted, +but a separate pattern is used: +

+
+      duplADeg : Str -> ADeg ;      -- fat, fatter, fattest
+
+

+

+If comparison is formed by more, //most, as in general for// +long adjective, the following pattern is used: +

+
+      compoundADeg : A -> ADeg ; -- -/more/most ridiculous
+
+

+

+From a given ADeg, it is possible to get back to A. +

+
+      adegA : ADeg -> A ;
+
+

+ +

Adverbs

+

+Adverbs are not inflected. Most lexical ones have position +after the verb. Some can be preverbal (e.g. always). +

+
+      mkAdv : Str -> Adv ;
+      mkAdV : Str -> AdV ;
+
+

+

+Adverbs modifying adjectives and sentences can also be formed. +

+
+      mkAdA : Str -> AdA ;
+
+

+ +

Prepositions

+

+A preposition as used for rection in the lexicon, as well as to +build PPs in the resource API, just requires a string. +

+
+      mkPreposition : Str -> Preposition ;
+      mkPrep        : Str -> Prep ;
+
+

+

+(These two functions are synonyms.) +

+ +

Verbs

+

+Except for be, the worst case needs five forms: the infinitive and +the third person singular present, the past indicative, and the +past and present participles. +

+
+      mkV : (go, goes, went, gone, going : Str) -> V ;
+
+

+

+The regular verb function recognizes the special cases where the last +character is y (cry - cries but buy - buys) or s, sh, x, z +(fix - fixes, etc). +

+
+      regV : Str -> V ;
+
+

+

+The following variant duplicates the last letter in the forms like +rip - ripped - ripping. +

+
+      regDuplV : Str -> V ;
+
+

+

+There is an extensive list of irregular verbs in the module IrregularEng. +In practice, it is enough to give three forms, +e.g. drink - drank - drunk, with a variant indicating consonant +duplication in the present participle. +

+
+      irregV     : (drink, drank, drunk  : Str) -> V ;
+      irregDuplV : (get,   got,   gotten : Str) -> V ;
+
+

+ +

Verbs with a particle.

+

+The particle, such as in switch on, is given as a string. +

+
+      partV  : V -> Str -> V ;
+
+

+ +

Two-place verbs

+

+Two-place verbs need a preposition, except the special case with direct object. +(transitive verbs). Notice that a particle comes from the V. +

+
+      mkV2  : V -> Preposition -> V2 ;
+    
+      dirV2 : V -> V2 ;
+
+

+ +

Three-place verbs

+

+Three-place (ditransitive) verbs need two prepositions, of which +the first one or both can be absent. +

+
+      mkV3     : V -> Preposition -> Preposition -> V3 ; -- speak, with, about
+      dirV3    : V -> Preposition -> V3 ;                -- give,_,to
+      dirdirV3 : V -> V3 ;                               -- give,_,_
+
+

+ +

Other complement patterns

+

+Verbs and adjectives can take complements such as sentences, +questions, verb phrases, and adjectives. +

+
+      mkV0  : V -> V0 ;
+      mkVS  : V -> VS ;
+      mkV2S : V -> Str -> V2S ;
+      mkVV  : V -> VV ;
+      mkV2V : V -> Str -> Str -> V2V ;
+      mkVA  : V -> VA ;
+      mkV2A : V -> Str -> V2A ;
+      mkVQ  : V -> VQ ;
+      mkV2Q : V -> Str -> V2Q ;
+    
+      mkAS  : A -> AS ;
+      mkA2S : A -> Str -> A2S ;
+      mkAV  : A -> AV ;
+      mkA2V : A -> Str -> A2V ;
+
+

+

+Notice: categories V2S, V2V, V2A, V2Q are in v 1.0 treated +just as synonyms of V2, and the second argument is given +as an adverb. Likewise AS, A2S, AV, A2V are just A. +V0 is just V. +

+
+      V0, V2S, V2V, V2A, V2Q : Type ;
+      AS, A2S, AV, A2V : Type ;
+
+

+ +

Definitions of paradigms

+

+The definitions should not bother the user of the API. So they are +hidden from the document. +

+ + + + diff --git a/lib/resource-1.0/doc/gfdoc/ParadigmsGer.html b/lib/resource-1.0/doc/gfdoc/ParadigmsGer.html new file mode 100644 index 000000000..ebfe08657 --- /dev/null +++ b/lib/resource-1.0/doc/gfdoc/ParadigmsGer.html @@ -0,0 +1,595 @@ + + + + + + + + +

+
+

+

+
+

+

+Author: +Last update: Tue Jan 10 16:38:53 2006 +

+

+Produced by +gfdoc - a rudimentary GF document generator. +(c) Aarne Ranta (aarne@cs.chalmers.se) 2002 under GNU GPL. +

+

+== +

+

+--# -path=.:../abstract:../../prelude +

+

+--1 German Lexical Paradigms +-- +-- Aarne Ranta 2003--2005 +-- +-- This is an API to the user of the resource grammar +-- for adding lexical items. It gives functions for forming +-- expressions of open categories: nouns, adjectives, verbs. +-- +-- Closed categories (determiners, pronouns, conjunctions) are +-- accessed through the resource syntax API, Structural.gf. +-- +-- The main difference with MorphoGer.gf is that the types +-- referred to are compiled resource grammar types. We have moreover +-- had the design principle of always having existing forms, rather +-- than stems, as string arguments of the paradigms. +-- +-- The structure of functions for each word class C is the following: +-- first we give a handful of patterns that aim to cover all +-- regular cases. Then we give a worst-case function mkC, which serves as an +-- escape to construct the most irregular words of type C. +-- However, this function should only seldom be needed: we have a +-- separate module IrregularGer, which covers all irregularly inflected +-- words. +-- +-- The following modules are presupposed: +

+

+resource ParadigmsGer = open +(Predef=Predef), +Prelude, +MorphoGer, +CatGer +in { +--2 Parameters +-- +-- To abstract over gender names, we define the following identifiers. +

+

+oper +Gender : Type ; +

+

+human : Gender ; +nonhuman : Gender ; +masculine : Gender ; +feminite : Gender ; +

+

+-- To abstract over number names, we define the following. +

+

+Number : Type ; +

+

+singular : Number ; +plural : Number ; +

+

+-- To abstract over case names, we define the following. +

+

+Case : Type ; +

+

+nominative : Case ; +genitive : Case ; +

+

+-- Prepositions are used in many-argument functions for rection. +

+

+Preposition : Type ; +

+

+--2 Nouns +

+

+-- Worst case: give all four forms and the semantic gender. +

+

+mkN : (man,men,man's,men's : Str) -> N ; +

+

+-- The regular function captures the variants for nouns ending with +-- s,sh,x,z or y: kiss - kisses, flash - flashes; +-- fly - flies (but toy - toys), +

+

+regN : Str -> N ; +

+

+-- In practice the worst case is just: give singular and plural nominative. +

+

+mk2N : (man,men : Str) -> N ; +

+

+-- All nouns created by the previous functions are marked as +-- nonhuman. If you want a human noun, wrap it with the following +-- function: +

+

+genderN : Gender -> N -> N ; +

+

+--3 Compound nouns +-- +-- All the functions above work quite as well to form compound nouns, +-- such as baby boom. +

+

+--3 Relational nouns +-- +-- Relational nouns (daughter of x) need a preposition. +

+

+mkN2 : N -> Preposition -> N2 ; +

+

+-- The most common preposition is of, and the following is a +-- shortcut for regular, nonhuman relational nouns with of. +

+

+regN2 : Str -> N2 ; +

+

+-- Use the function mkPreposition or see the section on prepositions below to +-- form other prepositions. +-- +-- Three-place relational nouns (the connection from x to y) need two prepositions. +

+

+mkN3 : N -> Preposition -> Preposition -> N3 ; +

+

+--3 Relational common noun phrases +-- +-- In some cases, you may want to make a complex CN into a +-- relational noun (e.g. the old town hall of). +

+

+cnN2 : CN -> Preposition -> N2 ; +cnN3 : CN -> Preposition -> Preposition -> N3 ; +

+

+-- +--3 Proper names and noun phrases +-- +-- Proper names, with a regular genitive, are formed as follows +

+

+regPN : Str -> Gender -> PN ; -- John, John's +

+

+-- Sometimes you can reuse a common noun as a proper name, e.g. Bank. +

+

+nounPN : N -> PN ; +

+

+-- To form a noun phrase that can also be plural and have an irregular +-- genitive, you can use the worst-case function. +

+

+mkNP : Str -> Str -> Number -> Gender -> NP ; +

+

+--2 Adjectives +

+

+-- Non-comparison one-place adjectives need two forms: one for +-- the adjectival and one for the adverbial form (free - freely) +

+

+mkA : (free,freely : Str) -> A ; +

+

+-- For regular adjectives, the adverbial form is derived. This holds +-- even for cases with the variation happy - happily. +

+

+regA : Str -> A ; +

+

+--3 Two-place adjectives +-- +-- Two-place adjectives need a preposition for their second argument. +

+

+mkA2 : A -> Preposition -> A2 ; +

+

+-- Comparison adjectives may two more forms. +

+

+ADeg : Type ; +

+

+mkADeg : (good,better,best,well : Str) -> ADeg ; +

+

+-- The regular pattern recognizes two common variations: +-- -e (rude - ruder - rudest) and +-- -y (happy - happier - happiest - happily) +

+

+regADeg : Str -> ADeg ; -- long, longer, longest +

+

+-- However, the duplication of the final consonant is nor predicted, +-- but a separate pattern is used: +

+

+duplADeg : Str -> ADeg ; -- fat, fatter, fattest +

+

+-- If comparison is formed by more, //most, as in general for// +-- long adjective, the following pattern is used: +

+

+compoundADeg : A -> ADeg ; -- -/more/most ridiculous +

+

+-- From a given ADeg, it is possible to get back to A. +

+

+adegA : ADeg -> A ; +

+

+--2 Adverbs +

+

+-- Adverbs are not inflected. Most lexical ones have position +-- after the verb. Some can be preverbal (e.g. always). +

+

+mkAdv : Str -> Adv ; +mkAdV : Str -> AdV ; +

+

+-- Adverbs modifying adjectives and sentences can also be formed. +

+

+mkAdA : Str -> AdA ; +

+

+--2 Prepositions +-- +-- A preposition as used for rection in the lexicon, as well as to +-- build PPs in the resource API, just requires a string. +

+

+mkPreposition : Str -> Preposition ; +mkPrep : Str -> Prep ; +

+

+-- (These two functions are synonyms.) +

+

+--2 Verbs +-- +-- Except for be, the worst case needs five forms: the infinitive and +-- the third person singular present, the past indicative, and the +-- past and present participles. +

+

+mkV : (go, goes, went, gone, going : Str) -> V ; +

+

+-- The regular verb function recognizes the special cases where the last +-- character is y (cry - cries but buy - buys) or s, sh, x, z +-- (fix - fixes, etc). +

+

+regV : Str -> V ; +

+

+-- The following variant duplicates the last letter in the forms like +-- rip - ripped - ripping. +

+

+regDuplV : Str -> V ; +

+

+-- There is an extensive list of irregular verbs in the module IrregularGer. +-- In practice, it is enough to give three forms, +-- e.g. drink - drank - drunk, with a variant indicating consonant +-- duplication in the present participle. +

+

+irregV : (drink, drank, drunk : Str) -> V ; +irregDuplV : (get, got, gotten : Str) -> V ; +

+

+--3 Verbs with a particle. +-- +-- The particle, such as in switch on, is given as a string. +

+

+partV : V -> Str -> V ; +

+

+--3 Two-place verbs +-- +-- Two-place verbs need a preposition, except the special case with direct object. +-- (transitive verbs). Notice that a particle comes from the V. +

+

+mkV2 : V -> Preposition -> V2 ; +

+

+dirV2 : V -> V2 ; +

+

+--3 Three-place verbs +-- +-- Three-place (ditransitive) verbs need two prepositions, of which +-- the first one or both can be absent. +

+

+mkV3 : V -> Preposition -> Preposition -> V3 ; -- speak, with, about +dirV3 : V -> Preposition -> V3 ; -- give,_,to +dirdirV3 : V -> V3 ; -- give,_,_ +

+

+--3 Other complement patterns +-- +-- Verbs and adjectives can take complements such as sentences, +-- questions, verb phrases, and adjectives. +

+

+mkV0 : V -> V0 ; +mkVS : V -> VS ; +mkV2S : V -> Str -> V2S ; +mkVV : V -> VV ; +mkV2V : V -> Str -> Str -> V2V ; +mkVA : V -> VA ; +mkV2A : V -> Str -> V2A ; +mkVQ : V -> VQ ; +mkV2Q : V -> Str -> V2Q ; +

+

+mkAS : A -> AS ; +mkA2S : A -> Str -> A2S ; +mkAV : A -> AV ; +mkA2V : A -> Str -> A2V ; +

+

+-- Notice: categories V2S, V2V, V2A, V2Q are in v 1.0 treated +-- just as synonyms of V2, and the second argument is given +-- as an adverb. Likewise AS, A2S, AV, A2V are just A. +-- V0 is just V. +

+

+V0, V2S, V2V, V2A, V2Q : Type ; +AS, A2S, AV, A2V : Type ; +

+

+--2 Definitions of paradigms +-- +-- The definitions should not bother the user of the API. So they are +-- hidden from the document. +--. +

+

+Gender = MorphoGer.Gender ; +Number = MorphoGer.Number ; +Case = MorphoGer.Case ; +human = Masc ; +nonhuman = Neutr ; +masculine = Masc ; +feminine = Fem ; +singular = Sg ; +plural = Pl ; +nominative = Nom ; +genitive = Gen ; +

+

+Preposition = Str ; +

+

+regN = \ray -> +let +ra = Predef.tk 1 ray ; +y = Predef.dp 1 ray ; +r = Predef.tk 2 ray ; +ay = Predef.dp 2 ray ; +rays = +case y of { +y => y2ie ray s ; +s => ray + es ; +z => ray + es ; +x => ray + es ; +_ => case ay of { +sh => ray + es ; +ch => ray + es ; +_ => ray + s +} +} +in +mk2N ray rays ; +

+

+mk2N = \man,men -> +let mens = case last men of { +s => men + ' ; +_ => men + 's +} +in +mkN man men (man + 's) mens ; +

+

+mkN = \man,men,man's,men's -> +mkNoun man man's men men's **** {g = Neutr ; lock_N = <>} ; +

+

+genderN g man = {s = man.s ; g = g ; lock_N = <>} ; +

+

+mkN2 = \n,p -> n **** {lock_N2 = <> ; c2 = p} ; +regN2 n = mkN2 (regN n) (mkPreposition of) ; +mkN3 = \n,p,q -> n **** {lock_N3 = <> ; c2 = p ; c3 = q} ; +cnN2 = \n,p -> n **** {lock_N2 = <> ; c2 = p} ; +cnN3 = \n,p,q -> n **** {lock_N3 = <> ; c2 = p ; c3 = q} ; +

+

+regPN n g = nameReg n g **** {lock_PN = <>} ; +nounPN n = {s = n.s ! singular ; g = n.g ; lock_PN = <>} ; +mkNP x y n g = {s = table {Gen => x ; _ => y} ; a = agrP3 n ; +lock_NP = <>} ; +

+

+mkA a b = mkAdjective a a a b **** {lock_A = <>} ; +regA a = regAdjective a **** {lock_A = <>} ; +

+

+mkA2 a p = a **** {c2 = p ; lock_A2 = <>} ; +

+

+ADeg = A ; ---- +

+

+mkADeg a b c d = mkAdjective a b c d **** {lock_A = <>} ; +

+

+regADeg happy = +let +happ = init happy ; +y = last happy ; +happie = case y of { +y => happ + ie ; +e => happy ; +_ => happy + e +} ; +happily = case y of { +y => happ + ily ; +_ => happy + ly +} ; +in mkADeg happy (happie + r) (happie + st) happily ; +

+

+duplADeg fat = +mkADeg fat +(fat + last fat + er) (fat + last fat + est) (fat + ly) ; +

+

+compoundADeg a = +let ad = (a.s ! AAdj Posit) +in mkADeg ad (more ++ ad) (most ++ ad) (a.s ! AAdv) ; +

+

+adegA a = a ; +

+

+mkAdv x = ss x **** {lock_Adv = <>} ; +mkAdV x = ss x **** {lock_AdV = <>} ; +mkAdA x = ss x **** {lock_AdA = <>} ; +

+

+mkPreposition p = p ; +mkPrep p = ss p **** {lock_Prep = <>} ; +

+

+mkV a b c d e = mkVerb a b c d e **** {s1 = [] ; lock_V = <>} ; +

+

+regV cry = +let +cr = init cry ; +y = last cry ; +cries = (regN cry).s ! Pl ! Nom ; -- ! +crie = init cries ; +cried = case last crie of { +e => crie + d ; +_ => crie + ed +} ; +crying = case y of { +e => case last cr of { +e => cry + ing ; +_ => cr + ing +} ; +_ => cry + ing +} +in mkV cry cries cried cried crying ; +

+

+regDuplV fit = +let fitt = fit + last fit in +mkV fit (fit + s) (fitt + ed) (fitt + ed) (fitt + ing) ; +

+

+irregV x y z = let reg = (regV x).s in +mkV x (reg ! VPres) y z (reg ! VPresPart) **** {s1 = [] ; lock_V = <>} ; +

+

+irregDuplV fit y z = +let +fitting = (regDuplV fit).s ! VPresPart +in +mkV fit (fit + s) y z fitting ; +

+

+partV v p = verbPart v p **** {lock_V = <>} ; +

+

+mkV2 v p = v **** {s = v.s ; s1 = v.s1 ; c2 = p ; lock_V2 = <>} ; +dirV2 v = mkV2 v [] ; +

+

+mkV3 v p q = v **** {s = v.s ; s1 = v.s1 ; c2 = p ; c3 = q ; lock_V3 = <>} ; +dirV3 v p = mkV3 v [] p ; +dirdirV3 v = dirV3 v [] ; +

+

+mkVS v = v **** {lock_VS = <>} ; +mkVV v = v **** {c2 = to ; lock_VV = <>} ; +mkVQ v = v **** {lock_VQ = <>} ; +

+

+V0 : Type = V ; +V2S, V2V, V2Q, V2A : Type = V2 ; +AS, A2S, AV : Type = A ; +A2V : Type = A2 ; +

+

+mkV0 v = v **** {lock_V = <>} ; +mkV2S v p = mkV2 v p **** {lock_V2 = <>} ; +mkV2V v p t = mkV2 v p **** {s4 = t ; lock_V2 = <>} ; +mkVA v = v **** {lock_VA = <>} ; +mkV2A v p = mkV2 v p **** {lock_V2A = <>} ; +mkV2Q v p = mkV2 v p **** {lock_V2 = <>} ; +

+

+mkAS v = v **** {lock_A = <>} ; +mkA2S v p = mkA2 v p **** {lock_A = <>} ; +mkAV v = v **** {lock_A = <>} ; +mkA2V v p = mkA2 v p **** {lock_A2 = <>} ; +

+

+} ; +

+ + + + diff --git a/lib/resource-1.0/doc/gfdoc/ParadigmsSwe.html b/lib/resource-1.0/doc/gfdoc/ParadigmsSwe.html new file mode 100644 index 000000000..a3b22645a --- /dev/null +++ b/lib/resource-1.0/doc/gfdoc/ParadigmsSwe.html @@ -0,0 +1,459 @@ + + + + + + + + +

+
+

+ + +

+
+

+

+Author: +Last update: Tue Jan 10 16:38:53 2006 +

+

+Produced by +gfdoc - a rudimentary GF document generator. +(c) Aarne Ranta (aarne@cs.chalmers.se) 2002 under GNU GPL. +

+

+== +

+

+# -path=.:../scandinavian:../common:../abstract:../../prelude +

+ +

Swedish Lexical Paradigms

+

+Aarne Ranta 2003 +

+

+This is an API to the user of the resource grammar +for adding lexical items. It gives functions for forming +expressions of open categories: nouns, adjectives, verbs. +

+

+Closed categories (determiners, pronouns, conjunctions) are +accessed through the resource syntax API, Structural.gf. +

+

+The main difference with MorphoSwe.gf is that the types +referred to are compiled resource grammar types. We have moreover +had the design principle of always having existing forms, rather +than stems, as string arguments of the paradigms. +

+

+The structure of functions for each word class C is the following: +first we give a handful of patterns that aim to cover all +regular cases. Then we give a worst-case function mkC, which serves as an +escape to construct the most irregular words of type C. +However, this function should only seldom be needed: we have a +separate module IrregularEng, which covers all irregularly inflected +words. +

+
+    resource ParadigmsSwe = 
+      open 
+        (Predef=Predef), 
+        Prelude, 
+        ResScand, 
+        DiffSwe, 
+        MorphoSwe, 
+        CatSwe in {
+
+

+ +

Parameters

+

+To abstract over gender names, we define the following identifiers. +

+
+    oper
+      Gender : Type ; 
+    
+      utrum     : Gender ;
+      neutrum   : Gender ;
+
+

+

+To abstract over number names, we define the following. +

+
+      Number : Type ; 
+    
+      singular : Number ;
+      plural   : Number ;
+
+

+

+To abstract over case names, we define the following. +

+
+      Case : Type ;
+    
+      nominative : Case ;
+      genitive   : Case ;
+
+

+

+Prepositions used in many-argument functions are just strings. +

+
+      Preposition : Type = Str ;
+
+

+ +

Nouns

+

+Worst case: give all four forms. The gender is computed from the +last letter of the second form (if n, then utrum, otherwise neutrum). +

+
+      mkN  : (apa,apan,apor,aporna : Str) -> N ;
+
+

+

+The regular function takes the singular indefinite form and the gender, +and computes the other forms by a heuristic. +If in doubt, use the cc command to test! +

+
+      regN : Str -> Gender -> N ;
+
+

+

+In practice the worst case is often just: give singular and plural indefinite. +

+
+      mk2N : (nyckel,nycklar : Str) -> N ;
+
+

+ +

Compound nouns

+

+All the functions above work quite as well to form compound nouns, +such as fotboll. +

+ +

Relational nouns

+

+Relational nouns (daughter of x) need a preposition. +

+
+      mkN2 : N -> Preposition -> N2 ;
+
+

+

+The most common preposition is av, and the following is a +shortcut for regular, nonhuman relational nouns with av. +

+
+      regN2 : Str -> Gender -> N2 ;
+
+

+

+Use the function mkPreposition or see the section on prepositions below to +form other prepositions. +

+

+Three-place relational nouns (the connection from x to y) need two prepositions. +

+
+      mkN3 : N -> Preposition -> Preposition -> N3 ;
+
+

+ +

Relational common noun phrases

+

+In some cases, you may want to make a complex CN into a +relational noun (e.g. the old town hall of). However, N2 and +N3 are purely lexical categories. But you can use the AdvCN +and PrepNP constructions to build phrases like this. +

+ +

Proper names and noun phrases

+

+Proper names, with a regular genitive, are formed as follows +

+
+      regPN : Str -> Gender -> PN ;          -- John, John's
+
+

+

+Sometimes you can reuse a common noun as a proper name, e.g. Bank. +

+
+      nounPN : N -> PN ;
+
+

+

+To form a noun phrase that can also be plural and have an irregular +genitive, you can use the worst-case function. +

+
+      mkNP : Str -> Str -> Number -> Gender -> NP ; 
+
+

+ +

Adjectives

+

+Non-comparison one-place adjectives need for forms: +

+
+      mkA : (galen,galet,galna : Str) -> A ;
+
+

+

+For regular adjectives, the other forms are derived. +

+
+      regA : Str -> A ;
+
+

+

+In practice, two forms are enough. +

+
+      mk2A : (bred,brett : Str) -> A ;
+
+

+ +

Two-place adjectives

+

+Two-place adjectives need a preposition for their second argument. +

+
+      mkA2 : A -> Preposition -> A2 ;
+
+

+

+Comparison adjectives may need as many as seven forms. +

+
+      ADeg : Type ;
+    
+      mkADeg : (liten, litet, lilla, sma, mindre, minst, minsta : Str) -> ADeg ;
+
+

+

+The regular pattern works for many adjectives, e.g. those ending +with ig. +

+
+      regADeg : Str -> ADeg ;
+
+

+

+Just the comparison forms can be irregular. +

+
+      irregADeg : (tung,tyngre,tyngst : Str) -> ADeg ;
+
+

+

+Sometimes just the positive forms are irregular. +

+
+      mk3ADeg : (galen,galet,galna : Str) -> ADeg ;
+      mk2ADeg : (bred,brett        : Str) -> ADeg ;
+
+

+

+If comparison is formed by more, //most, as in general for// +long adjective, the following pattern is used: +

+
+      compoundADeg : A -> ADeg ; -- -/more/most ridiculous
+
+

+

+From a given ADeg, it is possible to get back to A. +

+
+      adegA : ADeg -> A ;
+
+

+ +

Adverbs

+

+Adverbs are not inflected. Most lexical ones have position +after the verb. Some can be preverbal (e.g. always). +

+
+      mkAdv : Str -> Adv ;
+      mkAdV : Str -> AdV ;
+
+

+

+Adverbs modifying adjectives and sentences can also be formed. +

+
+      mkAdA : Str -> AdA ;
+
+

+ +

Prepositions

+

+A preposition is just a string. +

+
+      mkPreposition : Str -> Preposition ;
+
+

+ +

Verbs

+

+The worst case needs five forms. +

+
+      mkV : (supa,super,sup,söp,supit,supen : Str) -> V ;
+
+

+

+The 'regular verb' function is the first conjugation if the +infinitive ends with a (tala - talar - talade - talat), +the third in other cases (bo - bor - bodde - bott). +

+
+      regV : (tala : Str) -> V ;
+
+

+

+The almost regular verb function needs the infinitive and the preteritum. +It can deal with almost all cases in the first, second, and third +conjugation: tala - talade, leka - lekte, +gräva - grävde, byta - bytte, vända - vände, +tyda - tydde, bo - bodde. +

+
+      mk2V : (leka,lekte : Str) -> V ;
+
+

+

+There is an extensive list of irregular verbs in the module IrregularSwe. +In practice, it is enough to give three forms, as in school books. +

+
+      irregV : (dricka, drack, druckit  : Str) -> V ;
+
+

+ +

Verbs with a particle.

+

+The particle, such as in passa på, is given as a string. +

+
+      partV  : V -> Str -> V ;
+
+

+ +

Deponent verbs.

+

+Some words are used in passive forms only, e.g. hoppas. +

+
+      depV  : V -> V ;
+
+

+ +

Two-place verbs

+

+Two-place verbs need a preposition, except the special case with direct object. +(transitive verbs). Notice that a particle comes from the V. +

+
+      mkV2  : V -> Preposition -> V2 ;
+    
+      dirV2 : V -> V2 ;
+
+

+ +

Three-place verbs

+

+Three-place (ditransitive) verbs need two prepositions, of which +the first one or both can be absent. +

+
+      mkV3     : V -> Preposition -> Preposition -> V3 ; -- tala med om
+      dirV3    : V -> Preposition -> V3 ;                -- ge _ till
+      dirdirV3 : V -> V3 ;                               -- ge _ _
+
+

+ +

Other complement patterns

+

+Verbs and adjectives can take complements such as sentences, +questions, verb phrases, and adjectives. +

+
+      mkV0  : V -> V0 ;
+      mkVS  : V -> VS ;
+      mkV2S : V -> Str -> V2S ;
+      mkVV  : V -> VV ;
+      mkV2V : V -> Str -> Str -> V2V ;
+      mkVA  : V -> VA ;
+      mkV2A : V -> Str -> V2A ;
+      mkVQ  : V -> VQ ;
+      mkV2Q : V -> Str -> V2Q ;
+    
+      mkAS  : A -> AS ;
+      mkA2S : A -> Str -> A2S ;
+      mkAV  : A -> AV ;
+      mkA2V : A -> Str -> A2V ;
+
+

+

+Notice: categories V2S, V2V, V2A, V2Q are in v 1.0 treated +just as synonyms of V2, and the second argument is given +as an adverb. Likewise AS, A2S, AV, A2V are just A. +V0 is just V. +

+
+      V0, V2S, V2V, V2A, V2Q : Type ;
+      AS, A2S, AV, A2V : Type ;
+
+

+ +

Definitions of the paradigms

+

+The definitions should not bother the user of the API. So they are +hidden from the document. +

+ + + + diff --git a/lib/resource-1.0/doc/gfdoc/Phrase.html b/lib/resource-1.0/doc/gfdoc/Phrase.html new file mode 100644 index 000000000..115448f5b --- /dev/null +++ b/lib/resource-1.0/doc/gfdoc/Phrase.html @@ -0,0 +1,54 @@ + + + + + + + + +

+
+

+

+
+

+

+Author: +Last update: Tue Jan 10 16:38:51 2006 +

+

+Produced by +gfdoc - a rudimentary GF document generator. +(c) Aarne Ranta (aarne@cs.chalmers.se) 2002 under GNU GPL. +

+

+== +

+
+    abstract Phrase = Cat, Tense ** {
+    
+      fun
+        PhrUtt  : PConj -> Utt -> Voc -> Phr ;
+    
+        UttS    : S -> Utt ;
+        UttQS   : QS -> Utt ;
+        UttImpSg, UttImpPl  : Pol -> Imp -> Utt ;
+    
+        UttIP   : IP   -> Utt ;
+        UttIAdv : IAdv -> Utt ;
+        UttNP   : NP   -> Utt ;
+        UttAdv  : Adv  -> Utt ;
+        UttVP   : VP   -> Utt ;
+    
+        NoPConj : PConj ;
+        PConjConj : Conj -> PConj ;
+    
+        NoVoc   : Voc ;
+        VocNP   : NP -> Voc ;
+    }
+
+

+ + + + diff --git a/lib/resource-1.0/doc/gfdoc/Question.html b/lib/resource-1.0/doc/gfdoc/Question.html new file mode 100644 index 000000000..7fab6c788 --- /dev/null +++ b/lib/resource-1.0/doc/gfdoc/Question.html @@ -0,0 +1,48 @@ + + + + + + + + +

+
+

+

+
+

+

+Author: +Last update: Tue Jan 10 16:38:51 2006 +

+

+Produced by +gfdoc - a rudimentary GF document generator. +(c) Aarne Ranta (aarne@cs.chalmers.se) 2002 under GNU GPL. +

+

+== +

+
+    abstract Question = Cat ** {
+    
+      fun
+    
+        QuestCl    : Cl -> QCl ;
+        QuestVP    : IP -> VP -> QCl ;
+        QuestSlash : IP -> Slash -> QCl ;
+        QuestIAdv  : IAdv -> Cl -> QCl ;
+    
+        PrepIP : Prep -> IP -> IAdv ;
+        AdvIP  : IP -> Adv -> IP ;
+    
+        IDetCN : IDet -> Num -> Ord -> CN -> IP ;
+    
+    }
+
+

+ + + + diff --git a/lib/resource-1.0/doc/gfdoc/Relative.html b/lib/resource-1.0/doc/gfdoc/Relative.html new file mode 100644 index 000000000..2b0619abe --- /dev/null +++ b/lib/resource-1.0/doc/gfdoc/Relative.html @@ -0,0 +1,45 @@ + + + + + + + + +

+
+

+

+
+

+

+Author: +Last update: Tue Jan 10 16:38:51 2006 +

+

+Produced by +gfdoc - a rudimentary GF document generator. +(c) Aarne Ranta (aarne@cs.chalmers.se) 2002 under GNU GPL. +

+

+== +

+
+    abstract Relative = Cat ** {
+    
+      fun
+    
+        RelCl    : Cl -> RCl ;
+        RelVP    : RP -> VP -> RCl ;
+        RelSlash : RP -> Slash -> RCl ;
+    
+        FunRP : Prep -> NP -> RP -> RP ;
+        IdRP : RP ;
+    
+    }
+
+

+ + + + diff --git a/lib/resource-1.0/doc/gfdoc/Sentence.html b/lib/resource-1.0/doc/gfdoc/Sentence.html new file mode 100644 index 000000000..fdfc005f2 --- /dev/null +++ b/lib/resource-1.0/doc/gfdoc/Sentence.html @@ -0,0 +1,48 @@ + + + + + + + + +

+
+

+

+
+

+

+Author: +Last update: Tue Jan 10 16:38:52 2006 +

+

+Produced by +gfdoc - a rudimentary GF document generator. +(c) Aarne Ranta (aarne@cs.chalmers.se) 2002 under GNU GPL. +

+

+== +

+
+    abstract Sentence = Cat ** {
+    
+      fun
+    
+        PredVP   : NP -> VP -> Cl ;
+        PredSCVP : SC -> VP -> Cl ;
+    
+        ImpVP    : VP -> Imp ;
+    
+        SlashV2   : NP -> V2 -> Slash ;
+        SlashVVV2 : NP -> VV -> V2 -> Slash ;
+        AdvSlash  : Slash -> Adv -> Slash ;
+        SlashPrep : Cl -> Prep -> Slash ;
+    
+    }
+
+

+ + + + diff --git a/lib/resource-1.0/doc/gfdoc/SeqConjunction.html b/lib/resource-1.0/doc/gfdoc/SeqConjunction.html new file mode 100644 index 000000000..23a73141a --- /dev/null +++ b/lib/resource-1.0/doc/gfdoc/SeqConjunction.html @@ -0,0 +1,79 @@ + + + + + + + + +

+
+

+

+
+

+

+Author: +Last update: Tue Jan 10 16:38:52 2006 +

+

+Produced by +gfdoc - a rudimentary GF document generator. +(c) Aarne Ranta (aarne@cs.chalmers.se) 2002 under GNU GPL. +

+

+== +

+
+    abstract SeqConjunction = Cat ** {
+
+

+

+This module is for backward compatibility with API 0.9. +To be used instead of Conjunction. +

+
+      fun
+    
+        ConjS    : Conj -> SeqS -> S ;        -- "John walks and Mary runs"
+        ConjAP   : Conj -> SeqAP -> AP ;      -- "even and prime"
+        ConjNP   : Conj -> SeqNP -> NP ;      -- "John or Mary"
+        ConjAdv  : Conj -> SeqAdv -> Adv ;    -- "quickly or slowly"
+    
+        DConjS   : DConj -> SeqS -> S ;       -- "either John walks or Mary runs"
+        DConjAP  : DConj -> SeqAP -> AP ;     -- "both even and prime"
+        DConjNP  : DConj -> SeqNP -> NP ;     -- "either John or Mary"
+        DConjAdv : DConj -> SeqAdv -> Adv ;   -- "both badly and slowly"
+
+

+

+these are rather uninteresting +

+
+        TwoS : S -> S -> SeqS ;
+        AddS : SeqS -> S -> SeqS ;
+        TwoAdv : Adv -> Adv -> SeqAdv ;
+        AddAdv : SeqAdv -> Adv -> SeqAdv ;
+        TwoNP : NP -> NP -> SeqNP ;
+        AddNP : SeqNP -> NP -> SeqNP ;
+        TwoAP : AP -> AP -> SeqAP ;
+        AddAP : SeqAP -> AP -> SeqAP ;
+
+

+

+we use right-associative lists instead of GF's built-in lists +

+
+      cat
+        SeqS ; 
+        SeqAdv ; 
+        SeqNP ; 
+        SeqAP ;
+    
+    }
+
+

+ + + + diff --git a/lib/resource-1.0/doc/gfdoc/Structural.html b/lib/resource-1.0/doc/gfdoc/Structural.html new file mode 100644 index 000000000..92900ca1b --- /dev/null +++ b/lib/resource-1.0/doc/gfdoc/Structural.html @@ -0,0 +1,169 @@ + + + + + GF Resource Grammar API for Structural Words + +

GF Resource Grammar API for Structural Words

+ +Author:
+Last update: Tue Jan 10 16:38:52 2006 +
+ +

+
+

+ + +

+
+

+

+Produced by +gfdoc - a rudimentary GF document generator. +(c) Aarne Ranta (aarne@cs.chalmers.se) 2002 under GNU GPL. +

+ +

GF Resource Grammar API for Structural Words

+

+AR 21/11/2003 -- 30/11/2005 +

+

+Here we have some words belonging to closed classes and appearing +in all languages we have considered. +Sometimes they are not really meaningful, e.g. we_NP in Spanish +should be replaced by masculine and feminine variants. +

+
+    abstract Structural = Cat ** {
+    
+      fun
+
+

+

+This is an alphabetical list of structural words +

+
+      above_Prep : Prep ;
+      after_Prep : Prep ;
+
+

+

+all8mass_Det : Det ; +all_NDet : NDet ; +

+
+      all_Predet : Predet ; --
+      almost_AdA : AdA ;    -- Adv
+      almost_AdN : AdN ;    --
+      although_Subj : Subj ;
+      always_AdV : AdV ; --
+      and_Conj : Conj ;
+      because_Subj : Subj ;
+      before_Prep : Prep ;
+      behind_Prep : Prep ;
+      between_Prep : Prep ;
+      both7and_DConj : DConj ; -- ConjD
+      but_PConj : PConj ; --
+      by8agent_Prep : Prep ;
+      by8means_Prep : Prep ;
+      can8know_VV : VV ;
+      can_VV : VV ;
+      during_Prep : Prep ;
+      either7or_DConj : DConj ; -- ConjD
+      every_Det : Det ;
+      everybody_NP : NP ;
+      everything_NP : NP ;
+      everywhere_Adv : Adv ;
+      from_Prep : Prep ;
+      he_Pron : Pron ; -- NP
+      here_Adv : Adv ; --
+      here7to_Adv : Adv ;
+      here7from_Adv : Adv ;
+      how_IAdv : IAdv ;
+      how8many_IDet : IDet ;
+      i_Pron : Pron ; -- NP
+      if_Subj : Subj ;
+      in8front_Prep : Prep ;
+      in_Prep : Prep ;
+      it_Pron : Pron ;
+      less_CAdv : CAdv ; --
+      many_Det : Det ;
+      more_CAdv : CAdv ; --
+      most_Predet : Predet ; -- Det
+
+

+

+most8many_Det : Det ; +

+
+      much_Det : Det ;
+      must_VV : VV ;
+      no_Phr : Phr ;
+      on_Prep : Prep ;
+      only_Predet : Predet ; --
+      or_Conj : Conj ;
+      otherwise_PConj : PConj ;  -- AdC
+      part_Prep : Prep ;
+      please_Voc : Voc ;
+      possess_Prep : Prep ;
+      quite_Adv : AdA ;
+      she_Pron : Pron ;
+      so_AdA : AdA ; -- Adv
+      someSg_Det : Det ; -- some_Det
+      somePl_Det : Det ; -- NDet
+      somebody_NP : NP ;
+      something_NP : NP ;
+      somewhere_Adv : Adv ;
+      that_Quant : QuantSg ; -- Det
+      that_NP : NP ;
+      there_Adv : Adv ; --
+      there7to_Adv : Adv ; --
+      there7from_Adv : Adv ; --
+      therefore_PConj : PConj ; -- AdC
+      these_NP : NP ; --
+      these_Quant : QuantPl ; -- NDet
+
+

+

+they8fem_NP : NP ; +

+
+      they_Pron : Pron ; -- NP
+      this_Quant : QuantSg ; -- NDet
+      this_NP : NP ;
+      those_NP : NP ; --
+      those_Quant : QuantPl ; -- NDet
+      thou_Pron : Pron ; -- NP
+      through_Prep : Prep ;
+      to_Prep : Prep ;
+      too_AdA : AdA ;  -- Adv
+      under_Prep : Prep ;
+      very_AdA : AdA ; -- Adv
+      want_VV : VV ;
+      we_Pron : Pron ; -- NP
+      whatPl_IP : IP ; -- many
+      whatSg_IP : IP ; -- one
+      when_IAdv : IAdv ;
+      when_Subj : Subj ;
+      where_IAdv : IAdv ;
+      whichPl_IDet : IDet ; -- many
+      whichSg_IDet : IDet ; -- one
+      whoPl_IP : IP ;  -- many
+      whoSg_IP : IP ;  -- one
+      why_IAdv : IAdv ;
+      with_Prep : Prep ;
+      without_Prep : Prep ;
+      ye_Pron : Pron ; -- NP
+      yes_Phr : Phr ;
+      you_Pron : Pron ; -- NP
+    
+    }
+
+

+ + + + diff --git a/lib/resource-1.0/doc/gfdoc/Tense.html b/lib/resource-1.0/doc/gfdoc/Tense.html new file mode 100644 index 000000000..ec52a7519 --- /dev/null +++ b/lib/resource-1.0/doc/gfdoc/Tense.html @@ -0,0 +1,46 @@ + + + + + + + + +

+
+

+

+
+

+

+Author: +Last update: Tue Jan 10 16:38:52 2006 +

+

+Produced by +gfdoc - a rudimentary GF document generator. +(c) Aarne Ranta (aarne@cs.chalmers.se) 2002 under GNU GPL. +

+

+== +

+
+    abstract Tense = {
+    
+      cat
+        Pol ;
+        Tense ;
+        Ant ;
+    
+      fun
+        PPos, PNeg : Pol ;
+        TPres, TPast, TFut, TCond : Tense ;
+        ASimul, AAnter : Ant ;
+    
+    }
+
+

+ + + + diff --git a/lib/resource-1.0/doc/gfdoc/Tensed.html b/lib/resource-1.0/doc/gfdoc/Tensed.html new file mode 100644 index 000000000..2dc298716 --- /dev/null +++ b/lib/resource-1.0/doc/gfdoc/Tensed.html @@ -0,0 +1,41 @@ + + + + + + + + +

+
+

+

+
+

+

+Author: +Last update: Tue Jan 10 16:38:52 2006 +

+

+Produced by +gfdoc - a rudimentary GF document generator. +(c) Aarne Ranta (aarne@cs.chalmers.se) 2002 under GNU GPL. +

+

+== +

+
+    abstract Tensed = Cat, Tense ** {
+    
+      fun
+        UseCl  : Tense -> Ant -> Pol -> Cl  -> S ;
+        UseQCl : Tense -> Ant -> Pol -> QCl -> QS ;
+        UseRCl : Tense -> Ant -> Pol -> RCl -> RS ;
+    
+    }
+
+

+ + + + diff --git a/lib/resource-1.0/doc/gfdoc/Test.html b/lib/resource-1.0/doc/gfdoc/Test.html new file mode 100644 index 000000000..776911e01 --- /dev/null +++ b/lib/resource-1.0/doc/gfdoc/Test.html @@ -0,0 +1,48 @@ + + + + + + + + +

+
+

+

+
+

+

+Author: +Last update: Tue Jan 10 16:38:52 2006 +

+

+Produced by +gfdoc - a rudimentary GF document generator. +(c) Aarne Ranta (aarne@cs.chalmers.se) 2002 under GNU GPL. +

+

+== +

+
+    abstract Test = 
+      Noun,
+      Verb, 
+      Adjective,
+      Adverb,
+      -- Numeral,
+      Sentence, 
+      Question,
+      Relative,
+      Conjunction,
+      Phrase,
+      Untensed, 
+      -- Tensed,
+      Lex 
+      ** {} ;
+
+

+ + + + diff --git a/lib/resource-1.0/doc/gfdoc/Untensed.html b/lib/resource-1.0/doc/gfdoc/Untensed.html new file mode 100644 index 000000000..f47f9732d --- /dev/null +++ b/lib/resource-1.0/doc/gfdoc/Untensed.html @@ -0,0 +1,41 @@ + + + + + + + + +

+
+

+

+
+

+

+Author: +Last update: Tue Jan 10 16:38:52 2006 +

+

+Produced by +gfdoc - a rudimentary GF document generator. +(c) Aarne Ranta (aarne@cs.chalmers.se) 2002 under GNU GPL. +

+

+== +

+
+    abstract Untensed = Cat ** {
+    
+      fun
+        PosCl,  NegCl  : Cl  -> S ;
+        PosQCl, NegQCl : QCl -> QS ;
+        PosRCl, NegRCl : RCl -> RS ;
+    
+    }
+
+

+ + + + diff --git a/lib/resource-1.0/doc/gfdoc/Verb.html b/lib/resource-1.0/doc/gfdoc/Verb.html new file mode 100644 index 000000000..4887a1ab6 --- /dev/null +++ b/lib/resource-1.0/doc/gfdoc/Verb.html @@ -0,0 +1,68 @@ + + + + + + + + +

+
+

+

+
+

+

+Author: +Last update: Tue Jan 10 16:38:53 2006 +

+

+Produced by +gfdoc - a rudimentary GF document generator. +(c) Aarne Ranta (aarne@cs.chalmers.se) 2002 under GNU GPL. +

+

+== +

+
+    abstract Verb = Cat ** {
+    
+      fun
+        UseV    : V -> VP ;
+        ComplV2 : V2 -> NP -> VP ;
+        ComplV3 : V3 -> NP -> NP -> VP ;
+    
+        ComplVV : VV -> VP -> VP ;
+        ComplVS : VS -> S  -> VP ;
+        ComplVQ : VQ -> QS -> VP ;
+    
+        ComplVA : VA -> AP -> VP ;
+        ComplV2A : V2A -> NP -> AP -> VP ;
+    
+        ReflV2  : V2 -> VP ;
+        PassV2  : V2 -> Comp ; --- overgen (V2 with prep)
+    
+        UseComp : Comp -> VP ;
+    
+        AdvVP   : VP -> Adv -> VP ; -- here
+        AdVVP   : AdV -> VP -> VP ; -- always
+    
+        CompAP  : AP  -> Comp ;
+        CompNP  : NP  -> Comp ;
+        CompAdv : Adv -> Comp ;
+    
+        UseVV   : VV -> V2 ;
+        UseVQ   : VQ -> V2 ;
+        UseVS   : VS -> V2 ;
+    
+        EmbedS  : S  -> SC ;
+        EmbedQS : QS -> SC ;
+        EmbedVP : VP -> SC ;
+    
+    }
+
+

+ + + + diff --git a/lib/resource-1.0/english/CatEng.gf b/lib/resource-1.0/english/CatEng.gf index 6e0e8434c..52c4c4c77 100644 --- a/lib/resource-1.0/english/CatEng.gf +++ b/lib/resource-1.0/english/CatEng.gf @@ -49,8 +49,8 @@ concrete CatEng of Cat = open ResEng, Prelude in { CN = {s : Number => Case => Str} ; NP, Pron = {s : Case => Str ; a : Agr} ; - Det, Quant = {s : Str ; n : Number} ; - Predet, Num, Ord = {s : Str} ; + Det = {s : Str ; n : Number} ; + Predet, QuantSg, QuantPl, Num, Ord = {s : Str} ; -- Adverb diff --git a/lib/resource-1.0/english/NounEng.gf b/lib/resource-1.0/english/NounEng.gf index e8b4fcf78..7507384cf 100644 --- a/lib/resource-1.0/english/NounEng.gf +++ b/lib/resource-1.0/english/NounEng.gf @@ -10,16 +10,23 @@ concrete NounEng of Noun = CatEng ** open ResEng, Prelude in { UsePN pn = pn ** {a = agrP3 Sg} ; UsePron p = p ; - MkDet pred quant num ord = { - s = pred.s ++ quant.s ++ num.s ++ ord.s ; - n = quant.n + DetSg pred quant ord = { + s = pred.s ++ quant.s ++ ord.s ; + n = Sg } ; - PossPronSg p = {s = p.s ! Gen ; n = Sg} ; - PossPronPl p = {s = p.s ! Gen ; n = Pl} ; + DetPl pred quant num ord = { + s = pred.s ++ quant.s ++ num.s ++ ord.s ; + n = Pl + } ; + + PossSg p = {s = p.s ! Gen} ; + PossPl p = {s = p.s ! Gen} ; NoPredet, NoNum, NoOrd = {s = []} ; + NumInt n = n ; + OrdInt n = {s = n.s ++ "th"} ; --- NumNumeral numeral = {s = numeral.s ! NCard} ; OrdNumeral numeral = {s = numeral.s ! NOrd} ; @@ -32,7 +39,13 @@ concrete NounEng of Noun = CatEng ** open ResEng, Prelude in { DefPl = {s = artDef ; n = Pl} ; IndefSg = {s = artIndef ; n = Sg} ; - IndefPl = {s = [] ; n = Pl} ; + IndefPl = {s = [] ; n = Pl} ; + + MassDet = {s = [] ; n = Sg} ; + + UseN n = n ; + UseN2 n = n ; + UseN3 n = n ; ComplN2 f x = {s = \\n,c => f.s ! n ! Nom ++ f.c2 ++ x.s ! c} ; ComplN3 f x = {s = \\n,c => f.s ! n ! Nom ++ f.c2 ++ x.s ! c ; c2 = f.c3} ; @@ -45,6 +58,4 @@ concrete NounEng of Noun = CatEng ** open ResEng, Prelude in { SentCN cn s = {s = \\n,c => cn.s ! n ! c ++ conjThat ++ s.s} ; QuestCN cn qs = {s = \\n,c => cn.s ! n ! c ++ qs.s ! QIndir} ; - UseN n = n ; - } diff --git a/lib/resource-1.0/german/CatGer.gf b/lib/resource-1.0/german/CatGer.gf index a7cd69198..815d5390d 100644 --- a/lib/resource-1.0/german/CatGer.gf +++ b/lib/resource-1.0/german/CatGer.gf @@ -17,7 +17,8 @@ concrete CatGer of Cat = open ResGer, Prelude in { -- Sentence Cl = {s : Tense => Anteriority => Polarity => Order => Str} ; - Slash = {s : Tense => Anteriority => Polarity => Order => Str} ** {c2 : Preposition} ; + Slash = {s : Tense => Anteriority => Polarity => Order => Str} ** + {c2 : Preposition} ; Imp = {s : Polarity => Number => Str} ; -- Question @@ -47,7 +48,8 @@ concrete CatGer of Cat = open ResGer, Prelude in { CN = {s : Adjf => Number => Case => Str ; g : Gender} ; NP = {s : Case => Str ; a : Agr} ; Pron = {s : NPForm => Str ; a : Agr} ; - Det, Quant = {s : Gender => Case => Str ; n : Number ; a : Adjf} ; + Det = {s : Gender => Case => Str ; n : Number ; a : Adjf} ; + QuantSg, QuantPl = {s : Gender => Case => Str ; a : Adjf} ; Predet = {s : Number => Gender => Case => Str} ; Num = {s : Gender => Case => Str} ; Ord = {s : AForm => Str} ; diff --git a/lib/resource-1.0/german/NounGer.gf b/lib/resource-1.0/german/NounGer.gf index 9bfbc47b9..790cba41a 100644 --- a/lib/resource-1.0/german/NounGer.gf +++ b/lib/resource-1.0/german/NounGer.gf @@ -15,9 +15,19 @@ concrete NounGer of Noun = CatGer ** open ResGer, Prelude in { a = pron.a } ; - MkDet pred quant num ord = + DetSg pred quant ord = let - n = quant.n ; + n = Sg ; + a = quant.a + in { + s = \\g,c => pred.s ! n ! g ! c ++ quant.s ! g ! c ++ + ord.s ! agrAdj g (adjfCase a c) n c ; + n = n ; + a = a + } ; + DetPl pred quant num ord = + let + n = Pl ; a = quant.a in { s = \\g,c => pred.s ! n ! g ! c ++ quant.s ! g ! c ++ @@ -26,13 +36,13 @@ concrete NounGer of Noun = CatGer ** open ResGer, Prelude in { a = a } ; - PossPronSg p = { + PossSg p = { s = \\g,c => p.s ! NPPoss (gennum g Sg) c ; n = Sg ; a = Strong } ; - PossPronPl p = { + PossPl p = { s = \\g,c => p.s ! NPPoss (gennum g Pl) c ; n = Pl ; a = Weak @@ -73,6 +83,18 @@ concrete NounGer of Noun = CatGer ** open ResGer, Prelude in { a = Strong } ; + MassDet = { + s = \\g,c => [] ; + n = Sg ; + a = Strong + } ; + + + UseN, UseN2, UseN3 = \n -> { + s = \\_ => n.s ; + g = n.g + } ; + ComplN2 f x = { s = \\_,n,c => f.s ! n ! c ++ appPrep f.c2 x.s ; g = f.g @@ -108,9 +130,5 @@ concrete NounGer of Noun = CatGer ** open ResGer, Prelude in { g = cn.g } ; - UseN n = { - s = \\_ => n.s ; - g = n.g - } ; } diff --git a/lib/resource-1.0/scandinavian/CatScand.gf b/lib/resource-1.0/scandinavian/CatScand.gf index 823b9cba9..1f53e81ab 100644 --- a/lib/resource-1.0/scandinavian/CatScand.gf +++ b/lib/resource-1.0/scandinavian/CatScand.gf @@ -58,7 +58,9 @@ incomplete concrete CatScand of Cat = CN = {s : Number => DetSpecies => Case => Str ; g : Gender} ; NP,Pron = {s : NPForm => Str ; a : Agr} ; - Det, Quant = {s : Gender => Str ; n : Number ; det : DetSpecies} ; + Det = {s : Gender => Str ; n : Number ; det : DetSpecies} ; + QuantSg = {s : Gender => Str ; det : DetSpecies} ; + QuantPl = {s : Gender => Str ; det : DetSpecies} ; Predet = {s : GenNum => Str} ; Num = {s : Gender => Str} ; Ord = {s : Str} ; diff --git a/lib/resource-1.0/scandinavian/NounScand.gf b/lib/resource-1.0/scandinavian/NounScand.gf index c6b31a08b..040e9ec96 100644 --- a/lib/resource-1.0/scandinavian/NounScand.gf +++ b/lib/resource-1.0/scandinavian/NounScand.gf @@ -15,18 +15,23 @@ incomplete concrete NounScand of Noun = UsePron p = p ; - MkDet pred quant num ord = let n = quant.n in { - s = \\g => pred.s ! gennum g n ++ quant.s ! g ++ num.s ! g ++ ord.s ; - n = n ; + DetSg pred quant ord = { + s = \\g => pred.s ! gennum g Sg ++ quant.s ! g ++ ord.s ; + n = Sg ; + det = quant.det + } ; + DetPl pred quant num ord = { + s = \\g => pred.s ! gennum g Pl ++ quant.s ! g ++ num.s ! g ++ ord.s ; + n = Pl ; det = quant.det } ; - PossPronSg p = { + PossSg p = { s = \\g => p.s ! NPPoss (gennum g Sg) ; n = Sg ; det = DDef Indef } ; - PossPronPl p = { + PossPl p = { s = \\_ => p.s ! NPPoss Plg ; n = Pl ; det = DDef Indef @@ -34,7 +39,9 @@ incomplete concrete NounScand of Noun = NoPredet, NoNum = {s = \\_ => []} ; -- these get different types! NoOrd = {s = []} ; + NumInt n = {s = \\_ => n.s} ; + OrdInt n = {s = n.s ++ ":e"} ; --- NumNumeral numeral = {s = \\g => numeral.s ! NCard g} ; OrdNumeral numeral = {s = numeral.s ! NOrd SupWeak} ; @@ -46,8 +53,15 @@ incomplete concrete NounScand of Noun = DefSg = {s = \\g => artDef (gennum g Sg) ; n = Sg ; det = DDef detDef} ; DefPl = {s = \\_ => artDef Plg ; n = Pl ; det = DDef detDef} ; - IndefSg = {s = artIndef ; n = Sg ; det = DIndef} ; - IndefPl = {s = \\_ => [] ; n = Pl ; det = DIndef} ; + IndefSg = {s = artIndef ; n = Sg ; det = DIndef} ; + IndefPl = {s = \\_ => [] ; n = Pl ; det = DIndef} ; + + MassDet = {s = \\_ => [] ; n = Sg ; det = DIndef} ; + + UseN, UseN2, UseN3 = \noun -> { + s = \\n,d => noun.s ! n ! specDet d ; + g = noun.g + } ; -- The genitive of this $NP$ is not correct: "sonen till mig" (not "migs"). @@ -81,9 +95,4 @@ incomplete concrete NounScand of Noun = g = g } ; - UseN noun = { - s = \\n,d => noun.s ! n ! specDet d ; - g = noun.g - } ; - } diff --git a/src/tools/GFDoc.hs b/src/tools/GFDoc.hs index bc5bc999c..ee66d4974 100644 --- a/src/tools/GFDoc.hs +++ b/src/tools/GFDoc.hs @@ -280,7 +280,6 @@ doc2txt :: Doc -> String doc2txt (Doc title paras) = unlines $ let tit = concat (map item2txt title) in tit: - "Author: ": "Last update: %%date(%c)": "% NOTE: this is a txt2tags file.": "% Create an html file from this file using:": @@ -288,7 +287,6 @@ doc2txt (Doc title paras) = unlines $ "\n": concat (["Produced by " ++ welcome]) : "\n" : - concat (tagTxt "=" [tit]) : empty : map para2txt paras