diff --git a/lib/resource-0.6/doc/Combinations.html b/lib/resource-0.6/doc/Combinations.html new file mode 100644 index 000000000..2ce81d090 --- /dev/null +++ b/lib/resource-0.6/doc/Combinations.html @@ -0,0 +1,382 @@ + +
+ Produced by +gfdoc - a rudimentary GF document generator. +(c) Aarne Ranta (aarne@cs.chalmers.se) 2002 under GNU GPL. + ++
+Aarne Ranta 2002 -- 2003 +
+Although concrete syntax differs a lot between different languages, +many structures can be treated as common, on the level +of abstraction that GF provides. +What we will present in the following is a linguistically oriented abstract +syntax that has been successfully defined for the following languages: +
+
+The three-letter prefixes are used in file names all over the resource +grammar library; we refer to them commonly as X below. +
+ +The grammar has been applied to define language +fragments on technical or near-to-technical domains: database queries, +video recorder dialogue systems, software specifications, and a +health-related phrase book. Each new application helped to identify some +missing structures in the resource and suggested some additions, but the +number of required additions was usually small. + +To use the resource in applications, you need the following +cat and fun rules in oper form, completed by taking the +lincat and lin judgements of a particular language. This is done +by using, instead of this module, the reuse module which has the name +ResourceX. It is located in the subdirectory +grammars/resource/lang where lang is the full name of the language. +
+ abstract Combinations = PredefAbs ** {
+
+
++ +
+The categories of this resource grammar are mostly 'standard' categories +of linguistics. Their is no claim that they correspond to semantic categories +definable in type theory: to define such correspondences is the business +of applications grammars. In general, the correspondence between linguistic +and semantic categories is many-to-many. +
+Categories that may look special are Adj2, Fun, and TV. They are all +instances of endowing another category with a complement, which can be either +a direct object (whose case may vary) or a prepositional phrase. Prepositional +phrases that are not complements belong to the category +AdV of adverbials. +
+In each group below, some categories are lexical in the sense of only +containing atomic elements. These elements are not necessarily expressed by +one word in all languages; the essential thing is that they have no +constituents. Thus they have no productions in this part of the +resource grammar. The ParadigmsX grammars provide ways of defining +lexical elements. +
+Lexical categories are listed before other categories +in each group and divided by an empty line. +
+ +
+
+ cat + N ; -- simple common noun, e.g. "car" + PN ; -- proper name, e.g. "John", "New York" + Fun ; -- function word, e.g. "mother (of)" + Fun2 ; -- two-place function, e.g. "flight (from) (to)" + + CN ; -- common noun phrase, e.g. "red car", "car that John owns" + NP ; -- noun phrase, e.g. "John", "all cars", "you" + Det ; -- determiner, e.g. "every", "all" + Num ; -- numeral, e.g. "three", "879" ++ +
+ +
+
+ Adj1 ; -- one-place adjective, e.g. "even" + Adj2 ; -- two-place adjective, e.g. "divisible (by)" + AdjDeg ; -- degree adjective, e.g. "big/bigger/biggest" + + AP ; -- adjective phrase, e.g. "divisible by two", "bigger than John" ++ +The difference between Adj1 and AdjDeg is that the former has no +comparison forms. +
+ +
+
+ V ; -- one-place verb, e.g. "walk" + TV ; -- two-place verb, e.g. "love", "wait (for)", "switch on" + V3 ; -- three-place verb, e.g. "give", "prefer (stg) (to stg)" + VS ; -- sentence-compl. verb, e.g. "say", "prove" + VV ; -- verb-compl. verb, e.g. "can", "want" + + VG ; -- verbal group, e.g. "switch the light on" + VP ; -- verb phrase, e.g. "switch the light on", "don't run" ++ +
+ +
+This group has no lexical categories. +
+ AdV ; -- adverbial e.g. "now", "in the house" + AdA ; -- ad-adjective e.g. "very" + AdS ; -- sentence adverbial e.g. "therefore", "otherwise" + Prep ; -- pre/postposition, case e.g. "after", Adessive ++ +
+ +
+This group has no lexical categories. +
+ S ; -- sentence, e.g. "John walks" + Slash ; -- sentence without NP, e.g. "John waits for (...)" + RP ; -- relative pronoun, e.g. "which", "the mother of whom" + RC ; -- relative clause, e.g. "who walks", "that I wait for" ++ +
+ +
+This group has no lexical categories. +
+ IP ; -- interrogative pronoun, e.g. "who", "whose mother", "which yellow car" + IAdv ; -- interrogative adverb., e.g. "when", "why" + Qu ; -- question, e.g. "who walks" + Imp ; -- imperative, e.g. "walk!" ++ +
+ +
+
+ Conj ; -- conjunction, e.g. "and" + ConjD ; -- distributed conj. e.g. "both - and" + Subj ; -- subjunction, e.g. "if", "when" + + ListS ; -- list of sentences + ListAP ; -- list of adjectival phrases + ListNP ; -- list of noun phrases ++ +
+ +
+This group has no lexical categories. +
+ Phr ; -- full phrase, e.g. "John walks.","Who walks?", "Wait for me!" + Text ; -- sequence of phrases e.g. "One is odd. Therefore, two is even." ++ +
+ +
+This set of rules is minimal, in the sense of defining the simplest combinations +of categories and not having redundant rules. +When the resource grammar is used as a library, it will often be useful to +access it through an intermediate library that defines more rules as +'macros' for combinations of the ones below. +
+ +
+
+ fun + UseN : N -> CN ; -- "car" + UsePN : PN -> NP ; -- "John" + UseFun : Fun -> CN ; -- "successor" + UseInt : Int -> Num ; -- "32" --- assumes i > 1 + + SymbPN : String -> PN ; -- "x" + SymbCN : CN -> String -> CN ; -- "number x" + + ModAdj : AP -> CN -> CN ; -- "red car" + DetNP : Det -> CN -> NP ; -- "every car" + MassNP : CN -> NP ; -- "wine" + IndefOneNP : CN -> NP ; -- "a car", "cars" + IndefNumNP : Num -> CN -> NP ; -- "houses", "86 houses" + DefOneNP : CN -> NP ; -- "the car" + DefNumNP : Num -> CN -> NP ; -- "the cars", "the 86 cars" + ModGenOne : NP -> CN -> NP ; -- "John's car" + ModGenNum : Num -> NP -> CN -> NP ; -- "John's cars", "John's 86 cars" + AppFun : Fun -> NP -> CN ; -- "successor of zero" + AppFun2 : Fun2 -> NP -> Fun ; -- "flight from Paris" + CNthatS : CN -> S -> CN ; -- "idea that the Earth is flat" + NoNum : Num ; -- no numeral modifier ++ +
+ +
+
+ AdjP1 : Adj1 -> AP ; -- "red" + PositAdjP : AdjDeg -> AP ; -- "old" + + ComplAdj : Adj2 -> NP -> AP ; -- "divisible by two" + ComparAdjP : AdjDeg -> NP -> AP ; -- "older than John" + SuperlNP : AdjDeg -> CN -> NP ; -- "the oldest man" ++ +
+ +
+The principal way of forming sentences (S) is by combining a noun phrase +with a verb phrase (the PredVP rule below). In addition to this, verb +phrases have uses in relative clauses and questions. Verb phrases already +have (or have not) a negation, but they are formed from verbal groups +(VG), which have both positive and negative forms. +
+ PredV : V -> VG ; -- "walk", "doesn't walk" + PredPassV : V -> VG ; -- "is seen", "is not seen" + PredTV : TV -> NP -> VG ; -- "sees John", "doesn't see John" + PredVS : VS -> S -> VG ; -- "says that I run", "doesn't say..." + PredVV : VV -> VG -> VG ; -- "can run", "can't run", "tries to run" + PredV3 : V3 -> NP -> NP -> VG ; -- "prefers wine to beer" + + PredNP : NP -> VG ; -- "is John", "is not John" + PredAdV : AdV -> VG ; -- "is everywhere", "is not in France" + PredAP : AP -> VG ; -- "is old", "isn't old" + PredCN : CN -> VG ; -- "is a man", "isn't a man" + VTrans : TV -> V ; -- "loves" + + PosVG,NegVG : VG -> VP ; -- ++ +
+ +
+Here is how complex adverbs can be formed and used. +
+ AdjAdv : AP -> AdV ; -- "freely", "more consciously than you" + PrepNP : Prep -> NP -> AdV ; -- "in London", "after the war" + + AdvVP : VP -> AdV -> VP ; -- "always walks", "walks in the park" + AdvCN : CN -> AdV -> CN ; -- "house in London", "house today" + AdvAP : AdA -> AP -> AP ; -- "very good" ++ +
+ +
+
+ PredVP : NP -> VP -> S ; -- "John walks" + PosSlashTV,NegSlashTV : NP -> TV -> Slash ; -- "John sees", "John doesn't see" + OneVP : VP -> S ; -- "one walks" + ThereNP : NP -> S ; -- "there is a bar","there are 86 bars" + + IdRP : RP ; -- "which" + FunRP : Fun -> RP -> RP ; -- "the successor of which" + RelVP : RP -> VP -> RC ; -- "who walks", "who doesn't walk" + RelSlash : RP -> Slash -> RC ; -- "that I wait for"/"for which I wait" + ModRC : CN -> RC -> CN ; -- "man who walks" + RelSuch : S -> RC ; -- "such that it is even" ++ +
+ +
+
+ WhoOne, WhoMany : IP ; -- "who (is)", "who (are)" + WhatOne, WhatMany : IP ; -- "what (is)", "what (are)" + FunIP : Fun -> IP -> IP ; -- "the mother of whom" + NounIPOne, NounIPMany : CN -> IP ; -- "which car", "which cars" + + QuestVP : NP -> VP -> Qu ; -- "does John walk"; "doesn't John walk" + IntVP : IP -> VP -> Qu ; -- "who walks" + IntSlash : IP -> Slash -> Qu ; -- "whom does John see" + QuestAdv : IAdv -> NP -> VP -> Qu ; -- "why do you walk" + IsThereNP : NP -> Qu ; -- "is there a bar", "are there (86) bars" + + ImperVP : VP -> Imp ; -- "be a man" + + IndicPhrase : S -> Phr ; -- "I walk." + QuestPhrase : Qu -> Phr ; -- "Do I walk?" + ImperOne, ImperMany : Imp -> Phr ; -- "Be a man!", "Be men!" + + AdvS : AdS -> S -> Phr ; -- "Therefore, 2 is prime." ++ +
+ +
+We consider n-ary coordination, with n > 1. To this end, we have introduced +a list category ListX for each category X whose expressions we want to +conjoin. Each list category has two constructors, the base case being TwoX. +We have not defined coordination of all possible categories here, +since it can be tricky in many languages. For instance, VP coordination +is linguistically problematic in German because VP is a discontinuous +category. +
+ ConjS : Conj -> ListS -> S ; -- "John walks and Mary runs" + ConjAP : Conj -> ListAP -> AP ; -- "even and prime" + ConjNP : Conj -> ListNP -> NP ; -- "John or Mary" + + ConjDS : ConjD -> ListS -> S ; -- "either John walks or Mary runs" + ConjDAP : ConjD -> ListAP -> AP ; -- "both even and prime" + ConjDNP : ConjD -> ListNP -> NP ; -- "either John or Mary" + + TwoS : S -> S -> ListS ; + ConsS : ListS -> S -> ListS ; + + TwoAP : AP -> AP -> ListAP ; + ConsAP : ListAP -> AP -> ListAP ; + + TwoNP : NP -> NP -> ListNP ; + ConsNP : ListNP -> NP -> ListNP ; ++ +
+ +
+Subjunctions are different from conjunctions, but form +a uniform category among themselves. +
+ SubjS : Subj -> S -> S -> S ; -- "if 2 is odd, 3 is even" + SubjImper : Subj -> S -> Imp -> Imp ; -- "if it is hot, use a glove!" + SubjQu : Subj -> S -> Qu -> Qu ; -- "if you are new, who are you?" + SubjVP : VP -> Subj -> S -> VP ; -- "(a man who) sings when he runs" ++ +
+ +
+These are, more generally, one-phrase utterances. The list below +is very incomplete. +
+ PhrNP : NP -> Phr ; -- "Some man.", "John." + PhrOneCN, PhrManyCN : CN -> Phr ; -- "A car.", "Cars." + PhrIP : IAdv -> Phr ; -- "Who?" + PhrIAdv : IAdv -> Phr ; -- "Why?" ++ +
+ +
+A text is a sequence of phrases. It is defined like a non-empty list. +
+ OnePhr : Phr -> Text ; + ConsPhr : Phr -> Text -> Text ; + + } ; ++ + + diff --git a/lib/resource-0.6/doc/ParadigmsEng.html b/lib/resource-0.6/doc/ParadigmsEng.html new file mode 100644 index 000000000..b05c0ad39 --- /dev/null +++ b/lib/resource-0.6/doc/ParadigmsEng.html @@ -0,0 +1,211 @@ + + + Produced by +gfdoc - a rudimentary GF document generator. +(c) Aarne Ranta (aarne@cs.chalmers.se) 2002 under GNU GPL. + +
+
+ +# -path=.:../abstract:../../prelude ++Aarne Ranta 2003 +
+This is an API to the user of the resource grammar +for adding lexical items. It give shortcuts for forming +expressions of basic 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 following modules are presupposed: +
+ resource ParadigmsEng = open (Predef=Predef), Prelude, SyntaxEng, ResourceEng in {
+
+
++To abstract over gender names, we define the following identifiers. +
+ oper + human : Gender ; + nonhuman : Gender ; ++ +To abstract over number names, we define the following. +
+ singular : Number ; + plural : Number ; ++ +To abstract over case names, we define the following. +
+ nominative : Case ; + genitive : Case ; ++ +
+ oper + mkN : (man,men,man's,men's : Str) -> Gender -> N ; + nMan : (man,men : Str) -> Gender -> N ; ++ +Regular nouns, nouns ending with s, y, or o, and nouns with the same +plural form as the singular. +
+ nReg : Str -> Gender -> N ; -- dog, dogs + nKiss : Str -> Gender -> N ; -- kiss, kisses + nFly : Str -> Gender -> N ; -- fly, flies + nHero : Str -> Gender -> N ; -- hero, heroes (= nKiss !) + nSheep : Str -> Gender -> N ; -- sheep, sheep ++ +These use general heuristics, that recognizes the last letter. N.B it +does not get right with boy, rush, since it only looks at one letter. +
+ nHuman : Str -> N ; -- gambler/actress/nanny + nNonhuman : Str -> N ; -- dog/kiss/fly ++ +Nouns used as functions need a preposition. The most common is of. +
+ mkFun : N -> Preposition -> Fun ; + + funHuman : Str -> Fun ; -- the father/mistress/daddy of + funNonhuman : Str -> Fun ; -- the successor/address/copy of ++ +Proper names, with their regular genitive. +
+ pnReg : (John : Str) -> PN ; -- John, John's ++ +The most common cases on the higher-level category CN have shortcuts. +The regular y/s variation is taken into account. +
+ cnNonhuman : Str -> CN ; + cnHuman : Str -> CN ; + npReg : Str -> NP ; ++ +In some cases, you may want to make a complex CN into a function. +
+ mkFunCN : CN -> Preposition -> Fun ; + funOfCN : CN -> Fun ; ++ +
+ mkAdj1 : (even : Str) -> Adj1 ; ++ +Two-place adjectives need a preposition as second argument. +
+ mkAdj2 : (divisible, by : Str) -> Adj2 ; ++ +Comparison adjectives have three forms. The common irregular +cases are ones ending with y and a consonant that is duplicated; +the y ending is recognized by the function aReg. +
+ mkAdjDeg : (good,better,best : Str) -> AdjDeg ; + + aReg : (long : Str) -> AdjDeg ; -- long, longer, longest + aFat : (fat : Str) -> AdjDeg ; -- fat, fatter, fattest + aRidiculous : (ridiculous : Str) -> AdjDeg ; -- -/more/most ridiculous ++ +On higher level, there are adjectival phrases. The most common case is +just to use a one-place adjective. +
+ apReg : Str -> AP ; ++ +
+ mkAdv : Str -> AdV ; + mkAdvPre : Str -> AdV ; ++ +Adverbs modifying adjectives and sentences can also be formed. +
+ mkAdA : Str -> AdA ; + mkAdS : Str -> AdS ; ++ +Prepositional phrases are another productive form of adverbials. +
+ mkPP : Str -> NP -> AdV ; ++ +
+The fragment now has all verb forms, except the gerund/present participle. +Except for be, the worst case needs four forms: the infinitive and +the third person singular present, the past indicative, and the past participle. +
+ mkV : (go, goes, went, gone : Str) -> V ; + + vReg : (walk : Str) -> V ; -- walk, walks + vKiss : (kiss : Str) -> V ; -- kiss, kisses + vFly : (fly : Str) -> V ; -- fly, flies + vGo : (go : Str) -> V ; -- go, goes (= vKiss !) ++ +This generic function recognizes the special cases where the last +character is y, s, or z. It is not right for finish and convey. +
+ vGen : Str -> V ; -- walk/kiss/fly ++ +The verbs be and have are special. +
+ vBe : V ; + vHave : V ; ++ +Verbs with a particle. +
+ vPart : (go, goes, went, gone, up : Str) -> V ; + vPartReg : (get, up : Str) -> V ; ++ +Two-place verbs, and the special case with direct object. +Notice that a particle can already be included in V. +
+ mkTV : V -> Str -> TV ; -- look for, kill + + tvGen : (look, for : Str) -> TV ; -- look for, talk about + tvDir : V -> TV ; -- switch off + tvGenDir : (kill : Str) -> TV ; -- kill ++ +Regular two-place verbs with a particle. +
+ tvPartReg : Str -> Str -> Str -> TV ; -- get, along, with ++ +Ditransitive verbs. +
+ mkV3 : V -> Str -> Str -> V3 ; -- speak, with, about + v3Dir : V -> Str -> V3 ; -- give,_,to + v3DirDir : V -> V3 ; -- give,_,_ ++ +The definitions should not bother the user of the API. So they are +hidden from the document. + + diff --git a/lib/resource-0.6/doc/ParadigmsFin.html b/lib/resource-0.6/doc/ParadigmsFin.html new file mode 100644 index 000000000..7b2508846 --- /dev/null +++ b/lib/resource-0.6/doc/ParadigmsFin.html @@ -0,0 +1,268 @@ + + + Produced by +gfdoc - a rudimentary GF document generator. +(c) Aarne Ranta (aarne@cs.chalmers.se) 2002 under GNU GPL. + +
+
+Aarne Ranta 2003 +
+This is an API to the user of the resource grammar +for adding lexical items. It give shortcuts for forming +expressions of basic categories: nouns, adjectives, verbs. + +Closed categories (determiners, pronouns, conjunctions) are +accessed through the resource syntax API, Structural.gf. +
+The main difference with MorphoFin.gf is that the types +referred to are compiled resource grammar types. We have moreover +had the design principle of always having existing forms, not +stems, as string arguments of the paradigms, not stems. +
+This is the path to read the grammar from the same directory. +# -path=.:../abstract:../../prelude +
+The following modules are presupposed: +
+ resource ParadigmsFin = open Prelude, SyntaxFin, ResourceFin in {
+
+
++To abstract over gender, number, and (some) case names, +we define the following identifiers. +
+ oper + human : Gender ; + nonhuman : Gender ; + + singular : Number ; + plural : Number ; + + nominative : Case ; + genitive : Case ; + partitive : Case ; + inessive : Case ; + elative : Case ; + illative : Case ; + adessive : Case ; + ablative : Case ; + allative : Case ; ++ +
+ oper + mkN : + (talo,talon,talona,taloa,taloon,taloina,taloissa,talojen,taloja,taloihin + : Str) -> Gender -> N ; ++ +Nouns with partitive a/ are a large group. +To determine for grade and vowel alternation, three forms are usually needed: +singular nominative and genitive, and plural partitive. +Examples: talo, kukko, huippu, koira, kukka, syyl, srki... +
+ nKukko : (kukko,kukon,kukkoja : Str) -> N ; ++ +For convenience, we define 1-argument paradigms as producing the +nonhuman gender; the following function changes this: +
+ humanN : N -> N ; ++ +A special case are nouns with no alternations: +the vowel harmony is inferred from the last letter, +which must be one of o, u, , y. +
+ nTalo : (talo : Str) -> N ; ++ +Another special case are nouns where the last two consonants +undergo regular weak-grade alternation: +kukko - kukon, rutto - ruton, hyppy - hypyn, sampo - sammon, +kunto - kunnon, sislt - sislln, . +
+ nLukko : (lukko : Str) -> N ; ++ +arpi - arven, sappi - sapen, kampi - kammen;sylki - syljen +
+ nArpi : (arpi : Str) -> N ; + nSylki : (sylki : Str) -> N ; ++ +Foreign words ending in consonants are actually similar to words like +malli/mallin/malleja, with the exception that the i is not attached +to the singular nominative. Examples: linux, savett, screen. +The singular partitive form is used to get the vowel harmony. (N.B. more than +1-syllabic words ending in n would have variant plural genitive and +partitive forms, like sultanien/sultaneiden, which are not covered.) +
+ nLinux : (linuxia : Str) -> N ; ++ +Nouns of at least 3 syllables ending with a or , like peruna, tavara, +rytin. +
+ nPeruna : (peruna : Str) -> N ; ++ +The following paradigm covers both nouns ending in an aspirated e, such as +rae, perhe, savuke, and also many ones ending in a consonant +(rengas, ktkyt). The singular nominative and essive are given. +
+ nRae : (rae, rakeena : Str) -> N ; ++ +The following covers nouns with partitive ta/t, such as +susi, vesi, pieni. To get all stems and the vowel harmony, it takes +the singular nominative, genitive, and essive. +
+ nSusi : (susi,suden,sutta : Str) -> N ; ++ +Nouns ending with a long vowel, such as puu, p, pii, leikkuu, +are inflected according to the following. +
+ nPuu : (puu : Str) -> N ; ++ +One-syllable diphthong nouns, such as suo, tie, ty, are inflected by +the following. +
+ nSuo : (suo : Str) -> N ; ++ +Many adjectives but also nouns have the nominative ending nen which in other +cases becomes s: nainen, ihminen, keltainen. +To capture the vowel harmony, we use the partitive form as the argument. +
+ nNainen : (naista : Str) -> N ; ++ +The following covers some nouns ending with a consonant, e.g. +tilaus, kaulin, paimen, laidun. +
+ nTilaus : (tilaus,tilauksena : Str) -> N ; ++ +Special case: +
+ nKulaus : (kulaus : Str) -> N ; ++ +The following covers nouns like nauris and adjectives like kallis, tyyris. +The partitive form is taken to get the vowel harmony. +
+ nNauris : (naurista : Str) -> N ; ++ +Separately-written compound nouns, like sambal oelek, Urho Kekkonen, +have only their last part inflected. +
+ nComp : Str -> N -> N ; ++ +Nouns used as functions need a case, of which by far the commonest is +the genitive. +
+ mkFun : N -> Case -> Fun ; + fGen : N -> Fun ; ++ +Proper names can be formed by using declensions for nouns. +The plural forms are filtered away by the compiler. +
+ mkPN : N -> PN ; ++ +
+ mkAdj1 : N -> Adj1 ; ++ +Two-place adjectives need a case for the second argument. +
+ mkAdj2 : N -> Case -> Adj2 ; ++ +Comparison adjectives have three forms. The comparative and the superlative +are always inflected in the same way, so the nominative of them is actually +enough (except for the superlative paras of hyv). +
+ mkAdjDeg : (kiva : N) -> (kivempaa,kivinta : Str) -> AdjDeg ; ++ +
+The fragment only has present tense so far, but in all persons. +The worst case needs five forms, as shown in the following. +
+ mkV : (tulla,tulen,tulee,tulevat,tulkaa,tullaan : Str) -> V ; ++ +A simple special case is the one with just one stem and no grade alternation. +It covers e.g. sanoa, valua, kysy. +
+ vValua : (valua : Str) -> V ; ++ +With two forms, the following function covers a variety of verbs, such as +ottaa, kytt, lyt, huoltaa, hiiht, siirt. +
+ vKattaa : (kattaa, katan : Str) -> V ; ++ +When grade alternation is not present, just a one-form special case is needed +(poistaa, ryyst). +
+ vOstaa : (ostaa : Str) -> V ; ++ +The following covers +juosta, piest, nousta, rangaista, kvell, surra, panna. +
+ vNousta : (nousta, nousen : Str) -> V ; ++ +This is for one-syllable diphthong verbs like juoda, syd. +
+ vTuoda : (tuoda : Str) -> V ; ++ +The verbs be and the negative auxiliary are special. +
+ vOlla : V ; + vEi : V ; ++ +Two-place verbs need a case, and can have a pre- or postposition. +At least one of the latter is empty, []. +
+ mkTV : V -> Case -> (prep,postp : Str) -> TV ; ++ +If both are empty, the following special function can be used. +
+ tvCase : V -> Case -> TV ; ++ +Verbs with a direct (accusative) object +are special, since their complement case is finally decided in syntax. +
+ tvDir : V -> TV ; ++ +The definitions should not bother the user of the API. So they are +hidden from the document. + + diff --git a/lib/resource-0.6/doc/ParadigmsFre.html b/lib/resource-0.6/doc/ParadigmsFre.html new file mode 100644 index 000000000..29f8f87ec --- /dev/null +++ b/lib/resource-0.6/doc/ParadigmsFre.html @@ -0,0 +1,175 @@ + + + Produced by +gfdoc - a rudimentary GF document generator. +(c) Aarne Ranta (aarne@cs.chalmers.se) 2002 under GNU GPL. + +
+
+ +# -path=.:../romance:../abstract:../../prelude ++Aarne Ranta 2003 +
+This is an API to the user of the resource grammar +for adding lexical items. It give shortcuts for forming +expressions of basic categories: nouns, adjectives, verbs. + +Closed categories (determiners, pronouns, conjunctions) are +accessed through the resource syntax API, resource.Abs.gf. +
+The main difference with MorphoFre.gf is that the types +referred to are compiled resource grammar types. We have moreover +had the design principle of always having existing forms, not stems, as string +arguments of the paradigms. +
+The following modules are presupposed: +
+ resource ParadigmsFre =
+ open Prelude, (Types = TypesFre), SyntaxFre, MorphoFre,
+ ResourceFre in {
+
+
++To abstract over gender names, we define the following identifiers. +
+ oper + masculine : Gender ; + feminine : Gender ; ++ +To abstract over number names, we define the following. +
+ singular : Number ; + plural : Number ; ++ +To abstract over case names, we define the following. (Except for +some pronouns, the accusative is equal to the nominative, the +dative is formed by the preposition , and the genitive by the +preposition de.) +
+ nominative : Case ; + accusative : Case ; + dative : Case ; + genitive : Case ; ++ +
+ mkN : (_,_ : Str) -> Gender -> N ; -- oeil, yeux, masculine ++ +Often it is enough with one form. Some of them have a typical gender. +
+ nReg : Str -> Gender -> N ; -- regular, e.g. maison, (maisons,) feminine + nEau : Str -> Gender -> N ; -- eau, (eaux,) feminine + nCas : Str -> Gender -> N ; -- cas, (cas,) masculine + nCheval : Str -> N ; -- cheval, (chevaux, masculine) ++ +Nouns used as functions need a case and a preposition. The most common is de. +
+ funPrep : N -> Preposition -> Fun ; + funCase : N -> Case -> Fun ; + funDe : N -> Fun ; ++ +Proper names, with their gender. +
+ mkPN : Str -> Gender -> PN ; -- Jean, masculine ++ +On the top level, it is maybe CN that is used rather than N, and +NP rather than PN. +
+ mkCN : N -> CN ; + mkNP : Str -> Gender -> NP ; ++ +
+ Position : Type ; + prepos : Position ; + postpos : Position ; + + mkAdj1 : (bon, bonne, bons, bien : Str) -> Position -> Adj1 ; ++ +Usually it is enough to give the two singular forms. Fully regular adjectives +only need the masculine singular form. +
+ adj1Reg : Str -> Position -> Adj1 ; + adj1Cher : (cher, chre : Str) -> Position -> Adj1 ; ++ +Two-place adjectives need a preposition and a case as extra arguments. +
+ mkAdj2 : Adj1 -> Preposition -> Case -> Adj2 ; -- divisible par ++ +Comparison adjectives may need two adjectives, corresponding to the +positive and other forms. +
+ mkAdjDeg : (bon, meilleur : Adj1) -> AdjDeg ; ++ +In the completely regular case, the comparison forms are constructed by +the particle plus. +
+ aReg : Str -> Position -> AdjDeg ; -- lent (, plus lent) ++ +On top level, there are adjectival phrases. The most common case is +just to use a one-place adjective. +
+ apReg : Str -> Position -> AP ; ++ +
+The fragment only has present tense so far, but in all persons. +These are examples of standard conjugations are available. The full list +of Bescherelle conjugations is given in MorphoFra.gf, with all forms +(their type is Verbum). The present-tense forms can be extracted by the +function extractVerb. +
+ vAimer : Str -> V ; + vFinir : Str -> V ; + vDormir : Str -> V ; + vCourir : Str -> V ; + vVenir : Str -> V ; + + extractVerb : Verbum -> V ; ++ +The verbs 'be' and 'have' are special. +
+ vEtre : V ; + vAvoir : V ; ++ +Two-place verbs, and the special case with direct object. Notice that +a particle can be included in a V. +
+ mkTV : V -> Preposition -> Case -> TV ; + tvDir : V -> TV ; ++ +The idiom with avoir and an invariable noun, such as peur, faim, +and a two-place variant with de + complement. +
+ avoirChose : Str -> V ; + avoirChoseDe : Str -> TV ; ++ +The definitions should not bother the user of the API. So they are +hidden from the document. + + diff --git a/lib/resource-0.6/doc/ParadigmsGer.html b/lib/resource-0.6/doc/ParadigmsGer.html new file mode 100644 index 000000000..262349ed7 --- /dev/null +++ b/lib/resource-0.6/doc/ParadigmsGer.html @@ -0,0 +1,273 @@ + + + Produced by +gfdoc - a rudimentary GF document generator. +(c) Aarne Ranta (aarne@cs.chalmers.se) 2002 under GNU GPL. + +
+
+ +# -path=.:../abstract:../../prelude ++Aarne Ranta 2003 +
+This is an API to the user of the resource grammar +for adding lexical items. It give shortcuts for forming +expressions of basic categories: nouns, adjectives, verbs. + +Closed categories (determiners, pronouns, conjunctions) are +accessed through the resource syntax API, Resource.gf. +Their original typings via abstract syntax are in +Structural.gf, which also contains documentation. +
+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, not stems, as string +arguments of the paradigms. +
+The following modules are presupposed: +
+ resource ParadigmsGer =
+ open Prelude, (Morpho=MorphoGer), SyntaxGer, ResourceGer in {
+
+
++To abstract over gender names, we define the following identifiers. +
+ oper + masculine : Gender ; + feminine : Gender ; + neuter : Gender ; ++ +To abstract over case names, we define the following. +
+ nominative : Case ; + accusative : Case ; + dative : Case ; + genitive : Case ; ++ +To abstract over number names, we define the following. +
+ singular : Number ; + plural : Number ; ++ +
+ mkN : (_,_,_,_,_,_ : Str) -> Gender -> N ; + -- mann, mann, manne, mannes, mnner, mnnern ++ +Often it is enough with singular and plural nominatives, and singular +genitive. The plural dative +is computed by the heuristic that it is the same as the nominative this +ends with n or s, otherwise n is added. +
+ nGen : Str -> Str -> Str -> Gender -> N ; -- punkt,punktes,punkt ++ +Here are some common patterns. Singular nominative or two nominatives are needed. +Two forms are needed in case of Umlaut, which would be complicated to define. +For the same reason, we have separate patterns for multisyllable stems. + +The weak masculine pattern nSoldat avoids duplicating the final e. +
+ nRaum : (_,_ : Str) -> N ; -- Raum, (Raumes,) Rume (masc) + nTisch : Str -> N ; -- Tisch, (Tisches, Tische) (masc) + nVater : (_,_ : Str) -> N ; -- Vater, (Vaters,) Vter (masc) + nFehler : Str -> N ; -- Fehler, (fehlers, Fehler) (masc) + nSoldat : Str -> N ; -- Soldat (, Soldaten) ; Kunde (, Kunden) (masc) ++ +Neuter patterns. +
+ nBuch : (_,_ : Str) -> N ; -- Buch, (Buches, Bcher) (neut) + nMesser : Str -> N ; -- Messer, (Messers, Messer) (neut) + nAuto : Str -> N ; -- Auto, (Autos, Autos) (neut) ++ +Feminine patterns. Duplicated e is avoided in nFrau. +
+ nHand : (_,_ : Str) -> N ; -- Hand, Hnde; Mutter, Mtter (fem) + nFrau : Str -> N ; -- Frau (, Frauen) ; Wiese (, Wiesen) (fem) ++ +Nouns used as functions need a preposition. The most common is von. +
+ mkFun : N -> Preposition -> Case -> Fun ; + funVon : N -> Fun ; ++ +Proper names, with their possibly +irregular genitive. The regular genitive is s, omitted after s. +
+ mkPN : (karolus, karoli : Str) -> PN ; -- karolus, karoli + pnReg : (Johann : Str) -> PN ; -- Johann, Johanns ; Johannes, Johannes ++ +On the top level, it is maybe CN that is used rather than N, and +NP rather than PN. +
+ mkCN : N -> CN ; + mkNP : (karolus,karoli : Str) -> NP ; + + npReg : Str -> NP ; -- Johann, Johanns ++ +In some cases, you may want to make a complex CN into a function. +
+ mkFunCN : CN -> Preposition -> Case -> Fun ; + funVonCN : CN -> Fun ; ++ +
+ mkAdj1 : (teuer,teur : Str) -> Adj1 ; ++ +Invariable adjective are a special case. +
+ adjInvar : Str -> Adj1 ; -- prima ++ +The following heuristic recognizes the the end of the word, and builds +the second form depending on if it is e, er, or something else. +N.B. a contraction is made with er, which works for teuer but not +for bitter. +
+ adjGen : Str -> Adj1 ; -- gut; teuer; bse ++ +Two-place adjectives need a preposition and a case as extra arguments. +
+ mkAdj2 : Adj1 -> Str -> Case -> Adj2 ; -- teilbar, durch, acc ++ +Comparison adjectives may need three adjective, corresponding to the +three comparison forms. +
+ mkAdjDeg : (gut,besser,best : Adj1) -> AdjDeg ; ++ +In many cases, each of these adjectives is itself regular. Then we only +need three strings. Notice that contraction with er is not performed +(bessere, not bessre). +
+ aDeg3 : (gut,besser,best : Str) -> AdjDeg ; ++ +In the completely regular case, the comparison forms are constructed by +the endings er and st. +
+ aReg : Str -> AdjDeg ; -- billig, billiger, billigst ++ +The past participle of a verb can be used as an adjective. +
+ aPastPart : V -> Adj1 ; -- gefangen ++ +On top level, there are adjectival phrases. The most common case is +just to use a one-place adjective. The variation in adjGen is taken +into account. +
+ apReg : Str -> AP ; ++ +
+The fragment only has present tense so far, but in all persons. +It also has the infinitive and the past participles. +The worst case macro needs four forms: : the infinitive and +the third person singular (where Umlaut may occur), the singular imperative, +and the past participle. + +The function recognizes if the stem ends with s or t and performs the +appropriate contractions. +
+ mkV : (_,_,_,_ : Str) -> V ; -- geben, gibt, gib, gegeben ++ +Regular verbs are those where no Umlaut occurs. +
+ vReg : Str -> V ; -- fhren ++ +The verbs 'be' and 'have' are special. +
+ vSein : V ; + vHaben : V ; ++ +Some irregular verbs. +
+ vFahren : V ; ++ +Verbs with a detachable particle, with regular ones as a special case. +
+ vPart : (_,_,_,_,_ : Str) -> V ; -- sehen, sieht, sieh, gesehen, aus + vPartReg : (_,_ : Str) -> V ; -- bringen, um + mkVPart : V -> Str -> V ; -- vFahren, aus ++ +Two-place verbs, and the special case with direct object. Notice that +a particle can be included in a V. +
+ mkTV : V -> Str -> Case -> TV ; -- hren, zu, dative + + tvReg : Str -> Str -> Case -> TV ; -- hren, zu, dative + tvDir : V -> TV ; -- umbringen + tvDirReg : Str -> TV ; -- lieben ++ +Three-place verbs require two prepositions and cases. +
+ mkV3 : V -> Str -> Case -> Str -> Case -> V3 ; -- geben,[],dative,[],accusative ++ +Sentence-complement verbs are just verbs. +
+ mkVS : V -> VS ; ++ +Verb-complement verbs either need the zu particle or don't. +The ones that don't are usually auxiliary verbs. +
+ vsAux : V -> VV ; + vsZu : V -> VV ; ++ +
+Adverbials for modifying verbs, adjectives, and sentences can be formed +from strings. +
+ mkAdV : Str -> AdV ; + mkAdA : Str -> AdA ; + mkAdS : Str -> AdS ; ++ +Prepositional phrases are another productive form of adverbials. +
+ mkPP : Case -> Str -> NP -> AdV ; ++ +One can also use the function ResourceGer.PrepNP with one of the given +prepositions or a preposition formed by giving a string and a case: +
+ mkPrep : Str -> Case -> Prep ; ++ +The definitions should not bother the user of the API. So they are +hidden from the document. + + diff --git a/lib/resource-0.6/doc/ParadigmsIta.html b/lib/resource-0.6/doc/ParadigmsIta.html new file mode 100644 index 000000000..c5131e399 --- /dev/null +++ b/lib/resource-0.6/doc/ParadigmsIta.html @@ -0,0 +1,192 @@ + + + Produced by +gfdoc - a rudimentary GF document generator. +(c) Aarne Ranta (aarne@cs.chalmers.se) 2002 under GNU GPL. + +
+
+ +# -path=.:../romance:../abstract:../../prelude ++Aarne Ranta 2003 +
+This is an API to the user of the resource grammar +for adding lexical items. It give shortcuts for forming +expressions of basic categories: nouns, adjectives, verbs. + +Closed categories (determiners, pronouns, conjunctions) are +accessed through the resource syntax API, resource.Abs.gf. +
+The main difference with MorphoIta.gf is that the types +referred to are compiled resource grammar types. We have moreover +had the design principle of always having existing forms, not stems, as string +arguments of the paradigms. +
+The following modules are presupposed: +
+ resource ParadigmsIta =
+ open Prelude, (Types = TypesIta), SyntaxIta, MorphoIta,
+ ResourceIta in {
+
+
++To abstract over gender names, we define the following identifiers. +
+ oper + masculine : Gender ; + feminine : Gender ; ++ +To abstract over number names, we define the following. +
+ singular : Number ; + plural : Number ; ++ +To abstract over case names, we define the following. (Except for +some pronouns, the accusative is equal to the nominative, the +dative is formed by the preposition a, and the genitive by the +preposition di.) +
+ nominative : Case ; + accusative : Case ; + dative : Case ; + genitive : Case ; + + prep_a : Case ; + prep_di : Case ; + prep_da : Case ; + prep_in : Case ; + prep_su : Case ; + prep_con : Case ; ++ +
+ mkN : (_,_ : Str) -> Gender -> N ; -- uomo, uomini, masculine ++ +Often it is enough with one form. If it ends with +o or a, no gender is needed; if with something else, +the gender must be given. +
+ nVino : Str -> N ; -- vino (, vini, masculine) + nRana : Str -> N ; -- rana (, rane, feminine) + nSale : Str -> Gender -> N ; -- sale (, sali), masculine + nTram : Str -> Gender -> N ; -- tram (, tram), masculine ++ +Nouns used as functions need a case and a preposition. The most common is di. +Recall that the prepositions a, di, da, in, su, con are treated +as part of the case (cf. above). +
+ funPrep : N -> Preposition -> Fun ; + funCase : N -> Case -> Fun ; + funDi : N -> Fun ; ++ +Proper names, with their gender. +
+ mkPN : Str -> Gender -> PN ; -- Giovanni, masculine ++ +On the top level, it is maybe CN that is used rather than N, and +NP rather than PN. +
+ mkCN : N -> CN ; + mkNP : Str -> Gender -> NP ; ++ +
+ Position : Type ; + prepos : Position ; + postpos : Position ; + + mkAdj1 : (solo,sola,soli,sole,solamente : Str) -> Position -> Adj1 ; ++ +Adjectives ending with o and e, and invariable adjectives, +are the most important regular patterns. +
+ adj1Solo : (solo : Str) -> Bool -> Adj1 ; + adj1Tale : (tale : Str) -> Bool -> Adj1 ; + adj1Blu : (blu : Str) -> Bool -> Adj1 ; ++ +Two-place adjectives need a preposition and a case as extra arguments. +
+ mkAdj2 : Adj1 -> Preposition -> Case -> Adj2 ; -- divisibile per ++ +Comparison adjectives may need two adjectives, corresponding to the +positive and other forms. +
+ mkAdjDeg : (buono, migliore : Adj1) -> AdjDeg ; ++ +In the completely regular case, the comparison forms are constructed by +the particle pi. +
+ aSolo : Str -> Position -> AdjDeg ; -- lento (, pi lento) + aTale : Str -> Position -> AdjDeg ; -- grave (, pi grave) + aBlu : Str -> Position -> AdjDeg ; -- blu (, pi blu) ++ +On top level, there are adjectival phrases. The most common case is +just to use a one-place adjective. +
+ apSolo : Str -> Position -> AP ; + apTale : Str -> Position -> AP ; + apBlu : Str -> Position -> AP ; ++ +
+The fragment only has present tense so far, but in all persons. +The worst case needs nine forms (and is not very user-friendly). +
+ mkV : (_,_,_,_,_,_,_,_,_ : Str) -> V ; ++ +These are examples of standard conjugations. Other conjugations +can be extracted from the Italian functional morphology, which has full +Bescherelle tables. +
+ vAmare : Str -> V ; + vDormire : Str -> V ; + vFinire : Str -> V ; + vCorrere : (_,_ : Str) -> V ; ++ +The verbs 'be' and 'have' are special. +
+ vEssere : V ; + vAvere : V ; ++ +Two-place verbs, and the special case with direct object. Notice that +a particle can be included in a V. +
+ mkTV : V -> Preposition -> Case -> TV ; + tvDir : V -> TV ; ++ +The idiom with avere and an invariable noun, such as paura, fame, +and a two-place variant with di + complement. +
+ averCosa : Str -> V ; + averCosaDi : Str -> TV ; ++ +The definitions should not bother the user of the API. So they are +hidden from the document. + + diff --git a/lib/resource-0.6/doc/ParadigmsRus.html b/lib/resource-0.6/doc/ParadigmsRus.html new file mode 100644 index 000000000..2de910e3b --- /dev/null +++ b/lib/resource-0.6/doc/ParadigmsRus.html @@ -0,0 +1,238 @@ + + + Produced by +gfdoc - a rudimentary GF document generator. +(c) Aarne Ranta (aarne@cs.chalmers.se) 2002 under GNU GPL. + +
+
+ +# -path=.:../abstract:../../prelude +
+ resource ParadigmsRus = open (Predef=Predef), Prelude, SyntaxRus, ResourceRus in {
+
+ flags coding=utf8 ;
+
+
++ oper + masculine : Gender ; + feminine : Gender ; + neuter : Gender ; ++ +To abstract over case names, we define the following. +
+ nominative : Case ; + genitive : Case ; + dative : Case ; + accusative : Case ; + instructive : Case ; + prepositional : Case ; ++ +In some (written in English) textbooks accusative case +is put on the second place. However, we follow the case order +standard for Russian textbooks. +To abstract over number names, we define the following. +
+ singular : Number ; + plural : Number ; ++ +
+ mkIndeclinableNoun: Str -> Gender -> Animacy -> N ; ++ +Worst case - give six singular forms: +Nominative, Genetive, Dative, Accusative, Instructive and Prepositional; +corresponding six plural forms and the gender. +May be the number of forms needed can be reduced, +but this requires a separate investigation. +Animacy parameter (determining whether the Accusative form is equal +to the Nominative or the Genetive one) is actually of no help, +since there are a lot of exceptions and the gain is just one form less. +
+ mkN : (_,_,_,_,_,_,_,_,_,_,_,_ : Str) -> Gender -> Animacy -> N ; + + -- мужчина, мужчины, мужчине, мужчину, мужчиной, мужчине + -- мужчины, мужчин, мужчинам, мужчин, мужчинами, мужчинах ++ +Here are some common patterns. The list is far from complete. +Feminine patterns. +
+ nMashina : Str -> N ; -- feminine, inanimate, ending with "-а", Inst -"машин-ой" + nEdinica : Str -> N ; -- feminine, inanimate, ending with "-а", Inst -"единиц-ей" + nZhenchina : Str -> N ; -- feminine, animate, ending with "-a" + nNoga : Str -> N ; -- feminine, inanimate, ending with "г_к_х-a" + nMalyariya : Str -> N ; -- feminine, inanimate, ending with "-ия" + nTetya : Str -> N ; -- feminine, animate, ending with "-я" + nBol : Str -> N ; -- feminine, inanimate, ending with "-ь"(soft sign) ++ +Neuter patterns. +
+ nObezbolivauchee : Str -> N ; -- neutral, inanimate, ending with "-ee" + nProizvedenie : Str -> N ; -- neutral, inanimate, ending with "-e" + nChislo : Str -> N ; -- neutral, inanimate, ending with "-o" ++ +Masculine patterns. +
+ nStomatolog : Str -> N ; -- masculine, animate, ending with consonant + + -- the next two differ only in + -- plural nominative (= accusative) form(s) : + nAdres : Str -> N ; -- адрес-а + nTelefon : Str -> N ; -- телефон-ы + -- masculine, inanimate, ending with consonant + + nNol : Str -> N ; -- masculine, inanimate, ending with "-ь" (soft sign) + nUroven : Str -> N ; -- masculine, inanimate, ending with "-ень" ++ +Nouns used as functions need a preposition. The most common is with Genitive. +
+ mkFun : N -> Preposition -> Case -> Fun ; + funGen : N -> Fun ; ++ +Proper names. +
+ mkPN : Str -> Gender -> Animacy -> PN ; -- "Иван", "Маша" ++ +On the top level, it is maybe CN that is used rather than N, and +NP rather than PN. +
+ mkCN : N -> CN ; + mkNP : Str -> Gender -> Animacy -> NP ; ++ +
+ adjInvar : Str -> Adj1 ; -- khaki, mini, hindi, netto ++ +Some regular patterns depending on the ending. +
+ adj1Staruyj : Str -> Adj1 ; -- ending with "-ый" + adj1Malenkij : Str -> Adj1 ; -- endign with "-ий" + adj1Molodoj : Str -> Adj1 ; -- ending with "-ой", + -- plural - молод-ые" + adj1Kakoj_Nibud : Str -> Str -> Adj1 ; -- ending with "-ой", + -- plural - "как-ие" ++ +Two-place adjectives need a preposition and a case as extra arguments. +
+ mkAdj2 : Adj1 -> Str -> Case -> Adj2 ; -- "делим на" ++ +Comparison adjectives need a positive adjective +(28 forms without short forms). +Taking only one comparative form (non-syntaxic) and +only one superlative form (syntaxic) we can produce the +comparison adjective with only one extra argument - +non-syntaxic comparative form. +Syntaxic forms are based on the positive forms. +
+ mkAdjDeg : Adj1 -> Str -> AdjDeg ; ++ +On top level, there are adjectival phrases. The most common case is +just to use a one-place adjective. +
+ ap : Adj1 -> IsPostfixAdj -> AP ; ++ +
+ mkVerbum : Aspect -> (_,_,_,_,_,_,_,_,_ : Str) -> Verbum ; ++ +Common conjugation patterns are two conjugations: +first - verbs ending with -ать/-ять and second - -ить/-еть. +Instead of 6 present forms of the worst case, we only need +a present stem and one ending (singular, first person): +я люб-лю, я жд-у, etc. To determine where the border +between stem and ending lies it is sufficient to compare +first person from with second person form: +я люб-лю, ты люб-ишь. Stems shoud be the same. +So the definition for verb любить looks like: +mkRegVerb Imperfective Second люб лю любил люби любить; +
+ mkRegVerb :Aspect -> Conjugation -> (_,_,_,_,_ : Str) -> Verbum ; ++ +For writing an application grammar one usualy doesn't need +the whole inflection table, since each verb is used in +a particular context that determines some of the parameters +(Tense and Voice while Aspect is fixed from the beginning) for certain usage. +The V type, that have these parameters fixed. +We can extract the V from the lexicon. +
+ mkV: Verbum -> Voice -> Tense -> V ; + mkPresentV: Verbum -> Voice -> V ; ++ +Two-place verbs, and the special case with direct object. Notice that +a particle can be included in a V. +
+ mkTV : V -> Str -> Case -> TV ; -- "войти в дом"; "в", accusative + tvDir : V -> TV ; -- "видеть", "любить" ++ +The definitions should not bother the user of the API. So they are +hidden from the document. + + diff --git a/lib/resource-0.6/doc/ParadigmsSwe.html b/lib/resource-0.6/doc/ParadigmsSwe.html new file mode 100644 index 000000000..c233e32c6 --- /dev/null +++ b/lib/resource-0.6/doc/ParadigmsSwe.html @@ -0,0 +1,217 @@ + + + Produced by +gfdoc - a rudimentary GF document generator. +(c) Aarne Ranta (aarne@cs.chalmers.se) 2002 under GNU GPL. + +
+
+ +# -path=.:../abstract:../../prelude ++Aarne Ranta 2003 +
+This is an API to the user of the resource grammar +for adding lexical items. It give shortcuts for forming +expressions of basic 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, not stems, as string +arguments of the paradigms. +
+The following modules are presupposed: +
+ resource ParadigmsSwe = open (Predef=Predef), Prelude, SyntaxSwe, ResourceSwe in {
+
+
++To abstract over gender names, we define the following identifiers. +
+ oper + utrum : Gender ; + neutrum : Gender ; + + masculine : Sex ; + nonmasculine : Sex ; ++ +To abstract over case names, we define the following. +
+ nominative : Case ; + genitive : Case ; ++ +To abstract over number names, we define the following. +
+ singular : Number ; + plural : Number ; ++ +
+ mkN : (_,_,_,_ : Str) -> Gender -> Sex -> N ; + -- man, mannen, mn, mnnen ++ +Here are some common patterns, corresponding to school-gramamr declensions. +Except nPojke, nKarl, and nMurare, +they are defined to be nonmasculine, which means that they don't create +the definite adjective form with e but with a. +
+ nApa : Str -> N ; -- apa (apan, apor, aporna) ; utrum + nBil : Str -> N ; -- bil (bilen, bilar, bilarna) ; utrum + nKarl : Str -> N ; -- karl (karlen, karlar, karlarna) ; utrum ; masculine + nPojke : Str -> N ; -- pojke (pojken, pojkar, pojkarna) ; utrum ; masculine + nNyckel : Str -> N ; -- nyckel (nyckeln, nycklar, nycklarna) ; utrum + nRisk : Str -> N ; -- risk (risken, risker, riskerna) ; utrum + nDike : Str -> N ; -- dike (diket, diken, dikena) ; neutrum + nRep : Str -> N ; -- rep (repet, rep, repen) ; neutrum + nPapper : Str -> N ; -- papper (pappret, papper, pappren) ; neutrum + nMurare : Str -> N ; -- murare (muraren, murare, murarna) ; utrum ; masculine + nKikare : Str -> N ; -- kikare (kikaren, kikare, kikarna) ; utrum ++ +Nouns used as functions need a preposition. The most common ones are av, +p, and till. A preposition is a string. +
+ mkFun : N -> Str -> Fun ; + funAv : N -> Fun ; + funPaa : N -> Fun ; + funTill : N -> Fun ; ++ +Proper names, with their possibly +irregular genitive. The regular genitive is s, omitted after s. +
+ mkPN : (_,_ : Str) -> Gender -> Sex -> PN ; -- Karolus, Karoli + pnReg : Str -> Gender -> Sex -> PN ; -- Johan,Johans ; Johannes, Johannes + pnS : Str -> Gender -> Sex -> PN ; -- "Burger King(s)" ++ +On the top level, it is maybe CN that is used rather than N, and +NP rather than PN. +
+ mkCN : N -> CN ; + mkNP : (Karolus, Karoli : Str) -> Gender -> NP ; + + npReg : Str -> Gender -> NP ; -- Johann, Johanns ++ +
+ mkAdj1 : (_,_,_,_ : Str) -> Adj1 ; -- liten, litet, lilla, sm ++ +Special cases needing one form each are: regular adjectives, +adjectives with unstressed e in the last syllable, those +ending with n as a further special case, and invariable +adjectives. +
+ adjReg : Str -> Adj1 ; -- billig (billigt, billiga, billiga) + adjNykter : Str -> Adj1 ; -- nykter (nyktert, nyktra, nyktra) + adjGalen : Str -> Adj1 ; -- galen (galet, galna, galna) + adjInvar : Str -> Adj1 ; -- bra ++ +Two-place adjectives need a preposition and a case as extra arguments. +
+ mkAdj2 : Adj1 -> Str -> Adj2 ; -- delbar, med + mkAdj2Reg : Str -> Str -> Adj2 ; -- ++ +Comparison adjectives may need the three four forms for the positive case, plus +three more forms for the comparison cases. +
+ mkAdjDeg : (liten, litet, lilla, sma, mindre, minst, minsta : Str) -> AdjDeg ; ++ +Some comparison adjectives are completely regular. +
+ aReg : Str -> AdjDeg ; ++ +On top level, there are adjectival phrases. The most common case is +just to use a one-place adjective. The variation in adjGen is taken +into account. +
+ apReg : Str -> AP ; ++ +
+ mkAdv : Str -> AdV ; + mkAdvPre : Str -> AdV ; ++ +Adverbs modifying adjectives and sentences can also be formed. +
+ mkAdA : Str -> AdA ; + mkAdS : Str -> AdS ; ++ +Prepositional phrases are another productive form of adverbials. +
+ mkPP : Str -> NP -> AdV ; ++ +
+The fragment only has present tense so far. +The worst case needs three forms: the infinitive, the indicative, and the +imperative. +
+ mkV : (_,_,_ : Str) -> V ; -- vara, r, var; trivas, trivs, trivs ++ +The main conjugations need one string each. +
+ vKoka : Str -> V ; -- tala (talar, tala) + vSteka : Str -> V ; -- leka (leker, lek) + vBo : Str -> V ; -- bo (bor, bo) + + vAndas : Str -> V ; -- andas [all forms the same: also "slss"] + vTrivas : Str -> V ; -- trivas (trivs, trivs) ++ +The verbs 'be' and 'have' are special. +
+ vVara : V ; + vHa : V ; ++ +Particle verbs are formed by putting together a verb and a particle. +If the verb already has a particle, it is replaced by the new one. +
+ mkPartV : V -> Str -> V ; -- stnga av ; ++ +Two-place verbs, and the special case with direct object. +
+ mkTV : V -> Str -> TV ; -- tycka, om + tvDir : V -> TV ; -- gilla ++ +Ditransitive verbs. +
+ mkV3 : V -> Str -> Str -> V3 ; -- prata, med, om + v3Dir : V -> Str -> V3 ; -- ge,_,till + v3DirDir : V -> V3 ; -- ge,_,_ ++ +The definitions should not bother the user of the API. So they are +hidden from the document. + + diff --git a/lib/resource-0.6/doc/Predication.html b/lib/resource-0.6/doc/Predication.html new file mode 100644 index 000000000..8e0fe9342 --- /dev/null +++ b/lib/resource-0.6/doc/Predication.html @@ -0,0 +1,106 @@ + + + Produced by +gfdoc - a rudimentary GF document generator. +(c) Aarne Ranta (aarne@cs.chalmers.se) 2002 under GNU GPL. + +
+
+ ++(c) Aarne Ranta 2003 under Gnu GPL. +
+This library is built on a language-independent API of +resource grammars. It has a common part, the type signatures +(defined here), and language-dependent parts. The user of +the library should only have to look at the type signatures. +
+ incomplete resource Predication = open Resource, ResourceExt in {
+
+
+We first define a set of predication patterns.
++ oper + predV1 : V -> NP -> S ; -- one-place verb: "John walks" + predV2 : TV -> NP -> NP -> S ; -- two-place verb: "John loves Mary" + predV3 : V3 -> NP -> NP -> NP -> S ;-- three-place verb: "John prefers Mary to Jane" + predVColl : V -> NP -> NP -> S ; -- collective verb: "John and Mary fight" + predA1 : Adj1 -> NP -> S ; -- one-place adjective: "John is old" + predA2 : Adj2 -> NP -> NP -> S ; -- two-place adj: "John is married to Mary" + predAComp : AdjDeg -> NP -> NP -> S ; -- compar adj: "John is older than Mary" + predAColl : Adj1 -> NP -> NP -> S ; -- collective adj: "John and Mary are married" + predN1 : N -> NP -> S ; -- one-place noun: "John is a man" + predN2 : Fun -> NP -> NP -> S ; -- two-place noun: "John is a lover of Mary" + predNColl : N -> NP -> NP -> S ; -- collective noun: "John and Mary are lovers" + predAdv : AdV -> NP -> S ; -- adverb: "Joh is outside" ++ +Individual-valued function applications. +
+ appFun1 : Fun -> NP -> NP ; -- one-place function: "the successor of x" + appFun2 : Fun2 -> NP -> NP -> NP ; -- two-place function: "the distance from x to y" + appFunColl : Fun -> NP -> NP -> NP ; -- collective function: "the sum of x and y" ++ +Families of types, expressed by common nouns depending on arguments. +
+ appFam1 : Fun -> NP -> CN ; -- one-place family: "divisor of x" + appFamColl : Fun -> NP -> NP -> CN ; -- collective family: "path between x and y" ++ +Type constructor, similar to a family except that the argument is a type. +
+ constrTyp1 : Fun -> CN -> CN ; ++ +Logical connectives on two sentences. +
+ conjS : S -> S -> S ; + disjS : S -> S -> S ; + implS : S -> S -> S ; ++ +As an auxiliary, we need two-place conjunction of names (John and Mary), +used in collective predication. +
+ conjNP : NP -> NP -> NP ; ++ +--------------------------- +-- what follows should be an implementation of the preceding +
+ oper + predV1 = \F, x -> PredVP x (PosV F) ; + predV2 = \F, x, y -> PredVP x (PosTV F y) ; + predV3 = \F, x, y, z -> PredVP x (PosVG (PredV3 F y z)) ; + predVColl = \F, x, y -> PredVP (conjNP x y) (PosV F) ; + predA1 = \F, x -> PredVP x (PosA (AdjP1 F)) ; + predA2 = \F, x, y -> PredVP x (PosA (ComplAdj F y)) ; + predAComp = \F, x, y -> PredVP x (PosA (ComparAdjP F y)) ; + predAColl = \F, x, y -> PredVP (conjNP x y) (PosA (AdjP1 F)) ; + predN1 = \F, x -> PredVP x (PosCN (UseN F)) ; + predN2 = \F, x, y -> PredVP x (PosCN (AppFun F y)) ; + predNColl = \F, x, y -> PredVP (conjNP x y) (PosCN (UseN F)) ; + predAdv = \F, x -> PredVP x (PosVG (PredAdV F)) ; + + appFun1 = \f, x -> DefOneNP (AppFun f x) ; + appFun2 = \f, x, y -> DefOneNP (AppFun (AppFun2 f y) x) ; + appFunColl = \f, x, y -> DefOneNP (AppFun f (conjNP x y)) ; + + appFam1 = \F, x -> AppFun F x ; + appFamColl = \F, x, y -> AppFun F (conjNP x y) ; + + conjS = \A, B -> ConjS AndConj (TwoS A B) ; + disjS = \A, B -> ConjS OrConj (TwoS A B) ; + implS = \A, B -> SubjS IfSubj A B ; + + constrTyp1 = \F, A -> AppFun F (IndefManyNP A) ; + + conjNP = \x, y -> ConjNP AndConj (TwoNP x y) ; + + } ; ++ + + diff --git a/lib/resource-0.6/doc/Structural.html b/lib/resource-0.6/doc/Structural.html new file mode 100644 index 000000000..8c600f0cc --- /dev/null +++ b/lib/resource-0.6/doc/Structural.html @@ -0,0 +1,114 @@ + + + Produced by +gfdoc - a rudimentary GF document generator. +(c) Aarne Ranta (aarne@cs.chalmers.se) 2002 under GNU GPL. + +
+
+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. TheyNP in French +should really be replaced by masculine and feminine variants. +
+ abstract Structural = Combinations ** {
+
+ fun
+
+
++ +
+Many plural determiners can take a numeral modifier. So can the plural +pronouns we and you. +
+ EveryDet, WhichDet, AllMassDet, -- every, sg which, sg all + SomeDet, AnyDet, NoDet, -- sg some, any, no + MostDet, MostsDet, ManyDet, MuchDet : Det ; -- sg most, pl most, many, much + ThisDet, ThatDet : Det ; -- this, that + + AllNumDet, WhichNumDet, -- pl all, which (86) + SomeNumDet, AnyNumDet, NoNumDet, -- pl some, any, no + TheseNumDet, ThoseNumDet : Num -> Det ; -- these, those (86) + + ThisNP, ThatNP : NP ; -- this, that + TheseNumNP, ThoseNumNP : Num -> NP ; -- these, those (86) + INP, ThouNP, HeNP, SheNP, ItNP : NP ; -- personal pronouns in singular + WeNumNP, YeNumNP : Num -> NP ; -- these pronouns can take numeral + TheyNP : NP ; YouNP : NP ; -- they, the polite you + + EverybodyNP, SomebodyNP, NobodyNP, -- everybody, somebody, nobody + EverythingNP, SomethingNP, NothingNP : NP ; -- everything, something, nothing ++ +
+ +
+Depending on language, all, some, or none of there verbs belong to +a separate class of auxiliary verbs. The list is incomplete. +
+ CanVV, CanKnowVV, MustVV : VV ; -- can (pouvoir,savoir), must + WantVV : VV ; -- want (to do) ++ +
+ +
+
+ WhenIAdv,WhereIAdv,WhyIAdv,HowIAdv : IAdv ; -- when, where, why, how + EverywhereNP, SomewhereNP,NowhereNP : AdV ; -- everywhere, somewhere, nowhere + VeryAdv, TooAdv : AdA ; -- very, too + AlmostAdv, QuiteAdv : AdA ; -- almost, quite + OtherwiseAdv, ThereforeAdv : AdS ; -- therefore, otherwise ++ +
+ +
+
+ AndConj, OrConj : Conj ; -- and, or + BothAnd, EitherOr, NeitherNor : ConjD ; -- both-and, either-or, neither-nor + IfSubj, WhenSubj, AlthoughSubj : Subj ; -- if, when, although ++ +
+ +
+We have chosen a set of semantic relations expressible +by prepositions in some languages, by cases or postpositions in +others. Complement uses of prepositions are not included, and +should be treated by the use of many-place verbs, adjectives, and +functions. +
+ InPrep, OnPrep, ToPrep, FromPrep, -- spatial relations
+ ThroughPrep, AbovePrep, UnderPrep,
+ InFrontPrep, BehindPrep, BetweenPrep : Prep ;
+ BeforePrep, DuringPrep, AfterPrep : Prep ; -- temporal relations
+ WithPrep, WithoutPrep, ByMeansPrep : Prep ; -- some other relations
+ PossessPrep : Prep ; -- possessive/genitive
+ PartPrep : Prep ; -- partitive "of" ("bottle of wine")
+ AgentPrep : Prep ; -- agent "by" in passive constructions
+
+
++ +
+The negative-positive (French si, German doch) is missing. +
+ PhrYes, PhrNo : Phr ; -- yes, no + + } ++ + +