diff --git a/lib/resource-1.0/Makefile b/lib/resource-1.0/Makefile index 44839d8ba..bb3a3516c 100644 --- a/lib/resource-1.0/Makefile +++ b/lib/resource-1.0/Makefile @@ -1,5 +1,9 @@ +all: langs test + test: - gf -src */Lang*.gf + echo "gr -cat=S -tr -number=11 | l -multi gf" | gf langs.gfcm +langs: + echo "s ;; pm | wf langs.gfcm" | gf -src */Lang??*.gf english/LangEng.gf stat: wc */*.gfc diff --git a/lib/resource-1.0/README b/lib/resource-1.0/README index 4edba6dc9..f6a3461f2 100644 --- a/lib/resource-1.0/README +++ b/lib/resource-1.0/README @@ -14,6 +14,15 @@ will be kept available, but 'resource' will be renamed 'resource-0.9', and 'resource' will probably be made into a symbolic link to the current version. +To test: + + make + +For translation from Eng to all others, try e.g. + + gf langs.gfcm + > p -cat=Phr -mcfg "I haven't seen her" | l -multi + The main changes from 0.9 to 1.0 are 1. Refactoring of module structure: there are many more modules now. diff --git a/lib/resource-1.0/doc/gfdoc/Adjective.html b/lib/resource-1.0/doc/gfdoc/Adjective.html index 8f0773e64..e87145728 100644 --- a/lib/resource-1.0/doc/gfdoc/Adjective.html +++ b/lib/resource-1.0/doc/gfdoc/Adjective.html @@ -7,7 +7,7 @@
Author: -Last update: Thu Feb 2 16:24:10 2006 +Last update: Fri Feb 3 10:28:14 2006
Produced by diff --git a/lib/resource-1.0/doc/gfdoc/Lang.html b/lib/resource-1.0/doc/gfdoc/Lang.html index c10ff0743..1d1ebd393 100644 --- a/lib/resource-1.0/doc/gfdoc/Lang.html +++ b/lib/resource-1.0/doc/gfdoc/Lang.html @@ -7,7 +7,7 @@
Author: -Last update: Thu Feb 2 16:24:10 2006 +Last update: Fri Feb 3 10:28:14 2006
Produced by diff --git a/lib/resource-1.0/doc/gfdoc/Noun.html b/lib/resource-1.0/doc/gfdoc/Noun.html index 02df45262..5bd6ca134 100644 --- a/lib/resource-1.0/doc/gfdoc/Noun.html +++ b/lib/resource-1.0/doc/gfdoc/Noun.html @@ -7,7 +7,7 @@
Author: -Last update: Thu Feb 2 16:24:09 2006 +Last update: Fri Feb 3 10:28:12 2006
Produced by diff --git a/lib/resource-1.0/doc/gfdoc/ParadigmsFre.html b/lib/resource-1.0/doc/gfdoc/ParadigmsFre.html index c2a534870..5eb2a5b52 100644 --- a/lib/resource-1.0/doc/gfdoc/ParadigmsFre.html +++ b/lib/resource-1.0/doc/gfdoc/ParadigmsFre.html @@ -41,7 +41,7 @@
Author: -Last update: Thu Feb 2 16:24:09 2006 +Last update: Fri Feb 3 10:28:12 2006
Produced by diff --git a/lib/resource-1.0/doc/gfdoc/ParadigmsGer.html b/lib/resource-1.0/doc/gfdoc/ParadigmsGer.html index 009d41511..610e68c48 100644 --- a/lib/resource-1.0/doc/gfdoc/ParadigmsGer.html +++ b/lib/resource-1.0/doc/gfdoc/ParadigmsGer.html @@ -35,7 +35,7 @@
Author: -Last update: Thu Feb 2 16:24:09 2006 +Last update: Fri Feb 3 10:28:13 2006
Produced by diff --git a/lib/resource-1.0/doc/gfdoc/ParadigmsIta.html b/lib/resource-1.0/doc/gfdoc/ParadigmsIta.html index e3be9779e..249491e97 100644 --- a/lib/resource-1.0/doc/gfdoc/ParadigmsIta.html +++ b/lib/resource-1.0/doc/gfdoc/ParadigmsIta.html @@ -41,7 +41,7 @@
Author: -Last update: Thu Feb 2 16:24:09 2006 +Last update: Fri Feb 3 10:28:13 2006
Produced by diff --git a/lib/resource-1.0/doc/gfdoc/ParadigmsNor.html b/lib/resource-1.0/doc/gfdoc/ParadigmsNor.html index e8a7bc420..d95fa61dd 100644 --- a/lib/resource-1.0/doc/gfdoc/ParadigmsNor.html +++ b/lib/resource-1.0/doc/gfdoc/ParadigmsNor.html @@ -43,7 +43,7 @@
Author: -Last update: Thu Feb 2 16:24:09 2006 +Last update: Fri Feb 3 10:28:13 2006
Produced by diff --git a/lib/resource-1.0/doc/gfdoc/ParadigmsSpa.html b/lib/resource-1.0/doc/gfdoc/ParadigmsSpa.html new file mode 100644 index 000000000..f9849b50d --- /dev/null +++ b/lib/resource-1.0/doc/gfdoc/ParadigmsSpa.html @@ -0,0 +1,430 @@ + + +
+ + + + + + ++Author: +Last update: Fri Feb 3 10:28:13 2006 +
++Produced by +gfdoc - a rudimentary GF document generator. +(c) Aarne Ranta (aarne@cs.chalmers.se) 2002 under GNU GPL. +
++== +
++# -path=.:../romance:../common:../abstract:../../prelude +
+ ++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 MorphoSpa.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.
+
+ resource ParadigmsSpa =
+ open
+ (Predef=Predef),
+ Prelude,
+ CommonRomance,
+ ResSpa,
+ MorphoSpa,
+ BeschSpa,
+ CatSpa in {
+
+ flags optimize=all ;
+
+
+
++To abstract over gender names, we define the following identifiers. +
++ oper + Gender : Type ; + + masculine : Gender ; + feminine : Gender ; ++ +
+To abstract over number names, we define the following. +
++ Number : Type ; + + singular : Number ; + plural : Number ; ++ +
+Prepositions used in many-argument functions are either strings +(including the 'accusative' empty string) or strings that +amalgamate with the following word (the 'genitive' de and the +'dative' à). +
++ Preposition : Type ; + + accusative : Preposition ; + genitive : Preposition ; + dative : Preposition ; + + mkPreposition : Str -> Preposition ; ++ + +
+Worst case: two forms (singular + plural), +and the gender. +
++ mkN : (_,_ : Str) -> Gender -> N ; -- uomo, uomini, masculine ++ +
+The regular function takes the singular form and the gender, +and computes the plural and the gender by a heuristic. +The heuristic says that the gender is feminine for nouns +ending with a or z, and masculine for all other words. +Nouns ending with a, o, e have the plural with s, +those ending with z have ces in plural; all other nouns +have es as plural ending. The accent is not dealt with. +
++ regN : Str -> N ; ++ +
+To force a different gender, use one of the following functions. +
++ mascN : N -> N ; + femN : N -> N ; ++ + +
+Some nouns are ones where the first part is inflected as a noun but +the second part is not inflected. e.g. numéro de téléphone. +They could be formed in syntax, but we give a shortcut here since +they are frequent in lexica. +
++ compN : N -> Str -> N ; ++ + +
+Relational nouns (fille de x) need a case and a preposition. +
++ mkN2 : N -> Preposition -> N2 ; ++ +
+The most common cases are the genitive de and the dative a, +with the empty preposition. +
++ deN2 : N -> N2 ; + aN2 : N -> N2 ; ++ +
+Three-place relational nouns (la connessione di x a y) need two prepositions. +
++ mkN3 : N -> Preposition -> Preposition -> N3 ; ++ + +
+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 need a string and a gender. +
++ mkPN : Str -> Gender -> PN ; -- Jean ++ +
+To form a noun phrase that can also be plural, +you can use the worst-case function. +
++ mkNP : Str -> Gender -> Number -> NP ; ++ + +
+Non-comparison one-place adjectives need five forms in the worst +case (masc and fem singular, masc plural, adverbial). +
++ mkA : (solo,sola,soli,sole, solamente : Str) -> A ; ++ +
+For regular adjectives, all other forms are derived from the +masculine singular. The types of adjectives that are recognized are +alto, fuerte, util. +
++ regA : Str -> A ; ++ +
+These functions create postfix adjectives. To switch +them to prefix ones (i.e. ones placed before the noun in +modification, as in petite maison), the following function is +provided. +
++ prefA : A -> A ; ++ + +
+Two-place adjectives need a preposition for their second argument. +
++ mkA2 : A -> Preposition -> A2 ; ++ + +
+Comparison adjectives are in the worst case put up from two +adjectives: the positive (bueno), and the comparative (mejor). +
++ mkADeg : A -> A -> A ; ++ +
+If comparison is formed by mas, as usual in Spanish, +the following pattern is used: +
++ compADeg : A -> A ; ++ +
+The regular pattern is the same as regA for plain adjectives,
+with comparison by mas.
+
+ regADeg : Str -> A ; ++ + +
+Adverbs are not inflected. Most lexical ones have position +after the verb. +
++ mkAdv : Str -> Adv ; ++ +
+Some appear next to the verb (e.g. siempre). +
++ mkAdV : Str -> AdV ; ++ +
+Adverbs modifying adjectives and sentences can also be formed. +
++ mkAdA : Str -> AdA ; ++ + +
+Regular verbs are ones inflected like cortar, deber, or vivir.
+The regular verb function is the first conjugation (ar) recognizes
+the variations corresponding to the patterns
+actuar, cazar, guiar, pagar, sacar. The module BeschSpa gives
+the complete set of Bescherelle conjugations.
+
+ regV : Str -> V ; ++ +
+The module BeschSpa gives all the patterns of the Bescherelle
+book. To use them in the category V, wrap them with the function
+
+ verboV : Verbum -> V ; ++ +
+To form reflexive verbs: +
++ reflV : V -> V ; ++ +
+Verbs with a deviant passive participle: just give the participle +in masculine singular form as second argument. +
++ special_ppV : V -> Str -> V ; ++ + +
+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 ; ++ +
+You can reuse a V2 verb in V.
+
+ v2V : V2 -> V ; ++ + +
+Three-place (ditransitive) verbs need two prepositions, of which +the first one or both can be absent. +
++ mkV3 : V -> Preposition -> Preposition -> V3 ; -- parler, à, de + dirV3 : V -> Preposition -> V3 ; -- donner,_,à + dirdirV3 : V -> V3 ; -- donner,_,_ ++ + +
+Verbs and adjectives can take complements such as sentences, +questions, verb phrases, and adjectives. +
++ mkV0 : V -> V0 ; + mkVS : V -> VS ; + mkV2S : V -> Preposition -> V2S ; + mkVV : V -> VV ; -- plain infinitive: "je veux parler" + deVV : V -> VV ; -- "j'essaie de parler" + aVV : V -> VV ; -- "j'arrive à parler" + mkV2V : V -> Preposition -> Preposition -> V2V ; + mkVA : V -> VA ; + mkV2A : V -> Preposition -> V2A ; + mkVQ : V -> VQ ; + mkV2Q : V -> Preposition -> V2Q ; + + mkAS : A -> AS ; + subjAS : A -> AS ; + mkA2S : A -> Preposition -> A2S ; + mkAV : A -> Preposition -> AV ; + mkA2V : A -> Preposition -> Preposition -> 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 ; ++ + +
+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/ParadigmsSwe.html b/lib/resource-1.0/doc/gfdoc/ParadigmsSwe.html index ad4c8f0be..68fe50f46 100644 --- a/lib/resource-1.0/doc/gfdoc/ParadigmsSwe.html +++ b/lib/resource-1.0/doc/gfdoc/ParadigmsSwe.html @@ -43,7 +43,7 @@Author: -Last update: Thu Feb 2 16:24:10 2006 +Last update: Fri Feb 3 10:28:13 2006
Produced by diff --git a/lib/resource-1.0/doc/gfdoc/Phrase.html b/lib/resource-1.0/doc/gfdoc/Phrase.html index fc9dee9e8..6a6cec7da 100644 --- a/lib/resource-1.0/doc/gfdoc/Phrase.html +++ b/lib/resource-1.0/doc/gfdoc/Phrase.html @@ -7,7 +7,7 @@