forked from GitHub/gf-core
redocumenting resource
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
--1 The category system
|
--1 The category system
|
||||||
|
|
||||||
abstract Cat = {
|
abstract Cat = Tense ** {
|
||||||
|
|
||||||
cat
|
cat
|
||||||
|
|
||||||
@@ -13,19 +13,13 @@ abstract Cat = {
|
|||||||
Utt ; -- sentence, question, word... e.g. "be quiet"
|
Utt ; -- sentence, question, word... e.g. "be quiet"
|
||||||
Voc ; -- vocative or "please" e.g. "my darling"
|
Voc ; -- vocative or "please" e.g. "my darling"
|
||||||
|
|
||||||
--2 Tensed sentences
|
--2 Sentences and clauses
|
||||||
|
|
||||||
-- Constructed in [Tensed Tensed.html].
|
-- Constructed in [Sentence Sentence.html].
|
||||||
-- A simplified variant, with just present forms, is [Untensed Untensed.html].
|
|
||||||
|
|
||||||
S ; -- declarative sentence e.g. "she lived here"
|
S ; -- declarative sentence e.g. "she lived here"
|
||||||
QS ; -- question e.g. "where did she live"
|
QS ; -- question e.g. "where did she live"
|
||||||
RS ; -- relative e.g. "in which she lived"
|
RS ; -- relative e.g. "in which she lived"
|
||||||
|
|
||||||
--2 Clauses
|
|
||||||
|
|
||||||
-- Constructed in [Sentence Sentence.html].
|
|
||||||
|
|
||||||
Cl ; -- declarative clause, with all tenses e.g. "she looks at this"
|
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"
|
Slash ; -- clause missing NP (S/NP in GPSG) e.g. "she looks at"
|
||||||
Imp ; -- imperative e.g. "look at this"
|
Imp ; -- imperative e.g. "look at this"
|
||||||
@@ -108,7 +102,7 @@ abstract Cat = {
|
|||||||
|
|
||||||
--2 Words of open classes
|
--2 Words of open classes
|
||||||
|
|
||||||
-- These are constructed in [Basic Basic.html] and in additional lexicon modules.
|
-- These are constructed in [Lexicon Lexicon.html] and in additional lexicon modules.
|
||||||
|
|
||||||
V ; -- one-place verb e.g. "sleep"
|
V ; -- one-place verb e.g. "sleep"
|
||||||
V2 ; -- two-place verb e.g. "love"
|
V2 ; -- two-place verb e.g. "love"
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ abstract Lang =
|
|||||||
Relative,
|
Relative,
|
||||||
Conjunction,
|
Conjunction,
|
||||||
Phrase,
|
Phrase,
|
||||||
Tensed,
|
|
||||||
Structural,
|
Structural,
|
||||||
Basic
|
Lexicon
|
||||||
** {} ;
|
** {} ;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
--1 A Basic Lexicon
|
--1 A Lexicon Lexicon
|
||||||
|
|
||||||
-- This files gives a list of words whose purpose is to test the GF
|
-- This files gives a list of words whose purpose is to test the GF
|
||||||
-- resource grammar. It covers all lexical categories of [Cat Cat.html].
|
-- resource grammar. It covers all lexical categories of [Cat Cat.html].
|
||||||
@@ -10,7 +10,7 @@
|
|||||||
-- of the words in different languages are not guaranteed to be translation
|
-- of the words in different languages are not guaranteed to be translation
|
||||||
-- equivalents.
|
-- equivalents.
|
||||||
|
|
||||||
abstract Basic = Cat ** {
|
abstract Lexicon = Cat ** {
|
||||||
fun
|
fun
|
||||||
add_V3 : V3 ;
|
add_V3 : V3 ;
|
||||||
airplane_N : N ;
|
airplane_N : N ;
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
--1 Phrases and utterances
|
--1 Phrases and utterances
|
||||||
|
|
||||||
abstract Phrase = Cat, Tense ** {
|
abstract Phrase = Cat ** {
|
||||||
|
|
||||||
-- When a phrase is built from an utterance it can be prefixed
|
-- When a phrase is built from an utterance it can be prefixed
|
||||||
-- with a phrasal conjunction (such as "but", "therefore")
|
-- with a phrasal conjunction (such as "but", "therefore")
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
--1 Clauses, imperatives, and sentential complements
|
--1 Sentences, clauses, imperatives, and sentential complements
|
||||||
|
|
||||||
abstract Sentence = Cat ** {
|
abstract Sentence = Cat ** {
|
||||||
|
|
||||||
@@ -49,5 +49,35 @@ abstract Sentence = Cat ** {
|
|||||||
EmbedQS : QS -> SC ; -- whether you go
|
EmbedQS : QS -> SC ; -- whether you go
|
||||||
EmbedVP : VP -> SC ; -- to go
|
EmbedVP : VP -> SC ; -- to go
|
||||||
|
|
||||||
|
--2 Sentences
|
||||||
|
|
||||||
|
-- These are the 2 x 4 x 4 = 16 forms generated by different
|
||||||
|
-- combinations of tense, polarity, and
|
||||||
|
-- anteriority, which are defined in [Tense Tense.html].
|
||||||
|
|
||||||
|
fun
|
||||||
|
UseCl : Tense -> Ant -> Pol -> Cl -> S ;
|
||||||
|
UseQCl : Tense -> Ant -> Pol -> QCl -> QS ;
|
||||||
|
UseRCl : Tense -> Ant -> Pol -> RCl -> RS ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
-- Examples for English $S$/$Cl$:
|
||||||
|
{-
|
||||||
|
Pres Simul Pos ODir : he sleeps
|
||||||
|
Pres Simul Neg ODir : he doesn't sleep
|
||||||
|
Pres Anter Pos ODir : he has slept
|
||||||
|
Pres Anter Neg ODir : he hasn't slept
|
||||||
|
Past Simul Pos ODir : he slept
|
||||||
|
Past Simul Neg ODir : he didn't sleep
|
||||||
|
Past Anter Pos ODir : he had slept
|
||||||
|
Past Anter Neg ODir : he hadn't slept
|
||||||
|
Fut Simul Pos ODir : he will sleep
|
||||||
|
Fut Simul Neg ODir : he won't sleep
|
||||||
|
Fut Anter Pos ODir : he will have slept
|
||||||
|
Fut Anter Neg ODir : he won't have slept
|
||||||
|
Cond Simul Pos ODir : he would sleep
|
||||||
|
Cond Simul Neg ODir : he wouldn't sleep
|
||||||
|
Cond Anter Pos ODir : he would have slept
|
||||||
|
Cond Anter Neg ODir : he wouldn't have slept
|
||||||
|
-}
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 22 KiB |
60
lib/resource-1.0/doc/Lang.dot
Normal file
60
lib/resource-1.0/doc/Lang.dot
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
digraph {
|
||||||
|
|
||||||
|
size = "12,8" ;
|
||||||
|
|
||||||
|
Lang [style = "solid", shape = "ellipse", URL = "Lang.gf"];
|
||||||
|
Lang -> Noun [style = "solid"];
|
||||||
|
Lang -> Verb [style = "solid"];
|
||||||
|
Lang -> Adjective [style = "solid"];
|
||||||
|
Lang -> Adverb [style = "solid"];
|
||||||
|
Lang -> Numeral [style = "solid"];
|
||||||
|
Lang -> Sentence [style = "solid"];
|
||||||
|
Lang -> Question [style = "solid"];
|
||||||
|
Lang -> Relative [style = "solid"];
|
||||||
|
Lang -> Conjunction [style = "solid"];
|
||||||
|
Lang -> Phrase [style = "solid"];
|
||||||
|
Lang -> Structural [style = "solid"];
|
||||||
|
Lang -> Lexicon [style = "solid"];
|
||||||
|
|
||||||
|
Noun [style = "solid", shape = "ellipse", URL = "Noun.gf"];
|
||||||
|
Noun -> Cat [style = "solid"];
|
||||||
|
|
||||||
|
Verb [style = "solid", shape = "ellipse", URL = "Verb.gf"];
|
||||||
|
Verb -> Cat [style = "solid"];
|
||||||
|
|
||||||
|
Adjective [style = "solid", shape = "ellipse", URL = "Adjective.gf"];
|
||||||
|
Adjective -> Cat [style = "solid"];
|
||||||
|
|
||||||
|
Adverb [style = "solid", shape = "ellipse", URL = "Adverb.gf"];
|
||||||
|
Adverb -> Cat [style = "solid"];
|
||||||
|
|
||||||
|
Numeral [style = "solid", shape = "ellipse", URL = "Numeral.gf"];
|
||||||
|
Numeral -> Cat [style = "solid"];
|
||||||
|
|
||||||
|
Sentence [style = "solid", shape = "ellipse", URL = "Sentence.gf"];
|
||||||
|
Sentence -> Cat [style = "solid"];
|
||||||
|
|
||||||
|
Question [style = "solid", shape = "ellipse", URL = "Question.gf"];
|
||||||
|
Question -> Cat [style = "solid"];
|
||||||
|
|
||||||
|
Relative [style = "solid", shape = "ellipse", URL = "Relative.gf"];
|
||||||
|
Relative -> Cat [style = "solid"];
|
||||||
|
|
||||||
|
Conjunction [style = "solid", shape = "ellipse", URL = "Conjunction.gf"];
|
||||||
|
Conjunction -> Cat [style = "solid"];
|
||||||
|
|
||||||
|
Phrase [style = "solid", shape = "ellipse", URL = "Phrase.gf"];
|
||||||
|
Phrase -> Cat [style = "solid"];
|
||||||
|
|
||||||
|
Structural [style = "solid", shape = "ellipse", URL = "Structural.gf"];
|
||||||
|
Structural -> Cat [style = "solid"];
|
||||||
|
|
||||||
|
Lexicon [style = "solid", shape = "ellipse", URL = "Lexicon.gf"];
|
||||||
|
Lexicon -> Cat [style = "solid"];
|
||||||
|
|
||||||
|
Cat [style = "solid", shape = "ellipse", URL = "Cat.gf"];
|
||||||
|
Cat -> Tense [style = "solid"];
|
||||||
|
|
||||||
|
Tense [style = "solid", shape = "ellipse", URL = "Tense.gf"];
|
||||||
|
|
||||||
|
}
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 7.7 KiB |
@@ -7,7 +7,7 @@
|
|||||||
<P ALIGN="center"><CENTER><H1>Resource grammar writing HOWTO</H1>
|
<P ALIGN="center"><CENTER><H1>Resource grammar writing HOWTO</H1>
|
||||||
<FONT SIZE="4">
|
<FONT SIZE="4">
|
||||||
<I>Author: Aarne Ranta <aarne (at) cs.chalmers.se></I><BR>
|
<I>Author: Aarne Ranta <aarne (at) cs.chalmers.se></I><BR>
|
||||||
Last update: Thu Jan 5 23:19:40 2006
|
Last update: Wed Jan 25 14:52:10 2006
|
||||||
</FONT></CENTER>
|
</FONT></CENTER>
|
||||||
|
|
||||||
<P></P>
|
<P></P>
|
||||||
@@ -29,21 +29,22 @@ Last update: Thu Jan 5 23:19:40 2006
|
|||||||
<LI><A HREF="#toc10">Lock fields</A>
|
<LI><A HREF="#toc10">Lock fields</A>
|
||||||
<LI><A HREF="#toc11">Lexicon construction</A>
|
<LI><A HREF="#toc11">Lexicon construction</A>
|
||||||
</UL>
|
</UL>
|
||||||
<LI><A HREF="#toc12">Inside phrase category modules</A>
|
<LI><A HREF="#toc12">Inside grammar modules</A>
|
||||||
<UL>
|
<UL>
|
||||||
<LI><A HREF="#toc13">Noun</A>
|
<LI><A HREF="#toc13">The category system</A>
|
||||||
<LI><A HREF="#toc14">Verb</A>
|
<LI><A HREF="#toc14">Phrase category modules</A>
|
||||||
<LI><A HREF="#toc15">Adjective</A>
|
<LI><A HREF="#toc15">Resource modules</A>
|
||||||
|
<LI><A HREF="#toc16">Lexicon</A>
|
||||||
</UL>
|
</UL>
|
||||||
<LI><A HREF="#toc16">Lexicon extension</A>
|
<LI><A HREF="#toc17">Lexicon extension</A>
|
||||||
<UL>
|
<UL>
|
||||||
<LI><A HREF="#toc17">The irregularity lexicon</A>
|
<LI><A HREF="#toc18">The irregularity lexicon</A>
|
||||||
<LI><A HREF="#toc18">Lexicon extraction from a word list</A>
|
<LI><A HREF="#toc19">Lexicon extraction from a word list</A>
|
||||||
<LI><A HREF="#toc19">Lexicon extraction from raw text data</A>
|
<LI><A HREF="#toc20">Lexicon extraction from raw text data</A>
|
||||||
<LI><A HREF="#toc20">Extending the resource grammar API</A>
|
<LI><A HREF="#toc21">Extending the resource grammar API</A>
|
||||||
</UL>
|
</UL>
|
||||||
<LI><A HREF="#toc21">Writing an instance of parametrized resource grammar implementation</A>
|
<LI><A HREF="#toc22">Writing an instance of parametrized resource grammar implementation</A>
|
||||||
<LI><A HREF="#toc22">Parametrizing a resource grammar implementation</A>
|
<LI><A HREF="#toc23">Parametrizing a resource grammar implementation</A>
|
||||||
</UL>
|
</UL>
|
||||||
|
|
||||||
<P></P>
|
<P></P>
|
||||||
@@ -72,16 +73,8 @@ The following figure gives the dependencies of these modules.
|
|||||||
<IMG ALIGN="left" SRC="Lang.png" BORDER="0" ALT="">
|
<IMG ALIGN="left" SRC="Lang.png" BORDER="0" ALT="">
|
||||||
</P>
|
</P>
|
||||||
<P>
|
<P>
|
||||||
It is advisable to start with a simpler subset of the API, which
|
|
||||||
leaves out certain complicated but not always necessary things:
|
|
||||||
tenses and most part of the lexicon.
|
|
||||||
</P>
|
|
||||||
<P>
|
|
||||||
<IMG ALIGN="middle" SRC="Test.png" BORDER="0" ALT="">
|
|
||||||
</P>
|
|
||||||
<P>
|
|
||||||
The module structure is rather flat: almost every module is a direct
|
The module structure is rather flat: almost every module is a direct
|
||||||
parent of the top module (<CODE>Lang</CODE> or <CODE>Test</CODE>). The idea
|
parent of the top module <CODE>Lang</CODE>. The idea
|
||||||
is that you can concentrate on one linguistic aspect at a time, or
|
is that you can concentrate on one linguistic aspect at a time, or
|
||||||
also distribute the work among several authors.
|
also distribute the work among several authors.
|
||||||
</P>
|
</P>
|
||||||
@@ -137,20 +130,6 @@ can skip the <CODE>lincat</CODE> definition of a category and use the default
|
|||||||
<CODE>{s : Str}</CODE> until you need to change it to something else. In
|
<CODE>{s : Str}</CODE> until you need to change it to something else. In
|
||||||
English, for instance, most categories do have this linearization type!
|
English, for instance, most categories do have this linearization type!
|
||||||
</P>
|
</P>
|
||||||
<P>
|
|
||||||
As a slight asymmetry in the module diagrams, you find the following
|
|
||||||
modules:
|
|
||||||
</P>
|
|
||||||
<UL>
|
|
||||||
<LI><CODE>Tense</CODE>: defines the parameters of polarity, anteriority, and tense
|
|
||||||
<LI><CODE>Tensed</CODE>: defines how sentences use those parameters
|
|
||||||
<LI><CODE>Untensed</CODE>: makes sentences use the polarity parameter only
|
|
||||||
</UL>
|
|
||||||
|
|
||||||
<P>
|
|
||||||
The full resource API (<CODE>Lang</CODE>) uses <CODE>Tensed</CODE>, whereas the
|
|
||||||
restricted <CODE>Test</CODE> API uses <CODE>Untensed</CODE>.
|
|
||||||
</P>
|
|
||||||
<A NAME="toc4"></A>
|
<A NAME="toc4"></A>
|
||||||
<H3>Lexical modules</H3>
|
<H3>Lexical modules</H3>
|
||||||
<P>
|
<P>
|
||||||
@@ -165,29 +144,22 @@ API, the latter rule is sometimes violated in some languages.
|
|||||||
Another characterization of lexical is that lexical units can be added
|
Another characterization of lexical is that lexical units can be added
|
||||||
almost <I>ad libitum</I>, and they cannot be defined in terms of already
|
almost <I>ad libitum</I>, and they cannot be defined in terms of already
|
||||||
given rules. The lexical modules of the resource API are thus more like
|
given rules. The lexical modules of the resource API are thus more like
|
||||||
samples than complete lists. There are three such modules:
|
samples than complete lists. There are two such modules:
|
||||||
</P>
|
</P>
|
||||||
<UL>
|
<UL>
|
||||||
<LI><CODE>Structural</CODE>: structural words (determiners, conjunctions,...)
|
<LI><CODE>Structural</CODE>: structural words (determiners, conjunctions,...)
|
||||||
<LI><CODE>Basic</CODE>: basic everyday content words (nouns, verbs,...)
|
<LI><CODE>Lexicon</CODE>: basic everyday content words (nouns, verbs,...)
|
||||||
<LI><CODE>Lex</CODE>: a very small sample of both structural and content words
|
|
||||||
</UL>
|
</UL>
|
||||||
|
|
||||||
<P>
|
<P>
|
||||||
The module <CODE>Structural</CODE> aims for completeness, and is likely to
|
The module <CODE>Structural</CODE> aims for completeness, and is likely to
|
||||||
be extended in future releases of the resource. The module <CODE>Basic</CODE>
|
be extended in future releases of the resource. The module <CODE>Lexicon</CODE>
|
||||||
gives a "random" list of words, which enable interesting testing of syntax,
|
gives a "random" list of words, which enable interesting testing of syntax,
|
||||||
and also a check list for morphology, since those words are likely to include
|
and also a check list for morphology, since those words are likely to include
|
||||||
most morphological patterns of the language.
|
most morphological patterns of the language.
|
||||||
</P>
|
</P>
|
||||||
<P>
|
<P>
|
||||||
The module <CODE>Lex</CODE> is used in <CODE>Test</CODE> instead of the two
|
In the case of <CODE>Lexicon</CODE> it may come out clearer than anywhere else
|
||||||
larger modules. Its purpose is to provide a quick way to test the
|
|
||||||
syntactic structures of the phrase category modules without having to implement
|
|
||||||
the larger lexica.
|
|
||||||
</P>
|
|
||||||
<P>
|
|
||||||
In the case of <CODE>Basic</CODE> it may come out clearer than anywhere else
|
|
||||||
in the API that it is impossible to give exact translation equivalents in
|
in the API that it is impossible to give exact translation equivalents in
|
||||||
different languages on the level of a resource grammar. In other words,
|
different languages on the level of a resource grammar. In other words,
|
||||||
application grammars are likely to use the resource in different ways for
|
application grammars are likely to use the resource in different ways for
|
||||||
@@ -254,9 +226,9 @@ of resource v. 1.0.
|
|||||||
lines in the previous step) - but you uncommenting the first
|
lines in the previous step) - but you uncommenting the first
|
||||||
and the last lines will actually do the job for many of the files.
|
and the last lines will actually do the job for many of the files.
|
||||||
<P></P>
|
<P></P>
|
||||||
<LI>Now you can open the grammar <CODE>TestGer</CODE> in GF:
|
<LI>Now you can open the grammar <CODE>LangGer</CODE> in GF:
|
||||||
<PRE>
|
<PRE>
|
||||||
gf TestGer.gf
|
gf LangGer.gf
|
||||||
</PRE>
|
</PRE>
|
||||||
You will get lots of warnings on missing rules, but the grammar will compile.
|
You will get lots of warnings on missing rules, but the grammar will compile.
|
||||||
<P></P>
|
<P></P>
|
||||||
@@ -267,7 +239,7 @@ of resource v. 1.0.
|
|||||||
</PRE>
|
</PRE>
|
||||||
tells you what exactly is missing.
|
tells you what exactly is missing.
|
||||||
<P></P>
|
<P></P>
|
||||||
Here is the module structure of <CODE>TestGer</CODE>. It has been simplified by leaving out
|
Here is the module structure of <CODE>LangGer</CODE>. It has been simplified by leaving out
|
||||||
the majority of the phrase category modules. Each of them has the same dependencies
|
the majority of the phrase category modules. Each of them has the same dependencies
|
||||||
as e.g. <CODE>VerbGer</CODE>.
|
as e.g. <CODE>VerbGer</CODE>.
|
||||||
<P></P>
|
<P></P>
|
||||||
@@ -296,7 +268,7 @@ only one. So you will find yourself iterating the following steps:
|
|||||||
<P></P>
|
<P></P>
|
||||||
<LI>To be able to test the construction,
|
<LI>To be able to test the construction,
|
||||||
define some words you need to instantiate it
|
define some words you need to instantiate it
|
||||||
in <CODE>LexGer</CODE>. Again, it can be helpful to define some simple-minded
|
in <CODE>LexiconGer</CODE>. Again, it can be helpful to define some simple-minded
|
||||||
morphological paradigms in <CODE>ResGer</CODE>, in particular worst-case
|
morphological paradigms in <CODE>ResGer</CODE>, in particular worst-case
|
||||||
constructors corresponding to e.g.
|
constructors corresponding to e.g.
|
||||||
<CODE>ResEng.mkNoun</CODE>.
|
<CODE>ResEng.mkNoun</CODE>.
|
||||||
@@ -307,8 +279,8 @@ only one. So you will find yourself iterating the following steps:
|
|||||||
cc mkNoun "Brief" "Briefe" Masc
|
cc mkNoun "Brief" "Briefe" Masc
|
||||||
</PRE>
|
</PRE>
|
||||||
<P></P>
|
<P></P>
|
||||||
<LI>Uncomment <CODE>NounGer</CODE> and <CODE>LexGer</CODE> in <CODE>TestGer</CODE>,
|
<LI>Uncomment <CODE>NounGer</CODE> and <CODE>LexiconGer</CODE> in <CODE>LangGer</CODE>,
|
||||||
and compile <CODE>TestGer</CODE> in GF. Then test by parsing, linearization,
|
and compile <CODE>LangGer</CODE> in GF. Then test by parsing, linearization,
|
||||||
and random generation. In particular, linearization to a table should
|
and random generation. In particular, linearization to a table should
|
||||||
be used so that you see all forms produced:
|
be used so that you see all forms produced:
|
||||||
<PRE>
|
<PRE>
|
||||||
@@ -321,8 +293,9 @@ only one. So you will find yourself iterating the following steps:
|
|||||||
|
|
||||||
<P>
|
<P>
|
||||||
You are likely to run this cycle a few times for each linearization rule
|
You are likely to run this cycle a few times for each linearization rule
|
||||||
you implement, and some hundreds of times altogether. There are 159
|
you implement, and some hundreds of times altogether. There are 66 <CODE>cat</CODE>s and
|
||||||
<CODE>funs</CODE> in <CODE>Test</CODE> (at the moment).
|
458 <CODE>funs</CODE> in <CODE>Lang</CODE> at the moment; 149 of the <CODE>funs</CODE> are outside the two
|
||||||
|
lexicon modules).
|
||||||
</P>
|
</P>
|
||||||
<P>
|
<P>
|
||||||
Of course, you don't need to complete one phrase category module before starting
|
Of course, you don't need to complete one phrase category module before starting
|
||||||
@@ -335,7 +308,8 @@ Here is a <A HREF="../german/log.txt">live log</A> of the actual process of
|
|||||||
building the German implementation of resource API v. 1.0.
|
building the German implementation of resource API v. 1.0.
|
||||||
It is the basis of the more detailed explanations, which will
|
It is the basis of the more detailed explanations, which will
|
||||||
follow soon. (You will found out that these explanations involve
|
follow soon. (You will found out that these explanations involve
|
||||||
a rational reconstruction of the live process!)
|
a rational reconstruction of the live process! Among other things, the
|
||||||
|
API was changed during the actual process to make it more intuitive.)
|
||||||
</P>
|
</P>
|
||||||
<A NAME="toc8"></A>
|
<A NAME="toc8"></A>
|
||||||
<H3>Resource modules used</H3>
|
<H3>Resource modules used</H3>
|
||||||
@@ -343,8 +317,9 @@ a rational reconstruction of the live process!)
|
|||||||
These modules will be written by you.
|
These modules will be written by you.
|
||||||
</P>
|
</P>
|
||||||
<UL>
|
<UL>
|
||||||
<LI><CODE>ResGer</CODE>: parameter types and auxiliary operations
|
<LI><CODE>ParamGer</CODE>: parameter types
|
||||||
<LI><CODE>MorphoGer</CODE>: complete inflection engine; not needed for <CODE>Test</CODE>.
|
<LI><CODE>ResGer</CODE>: auxiliary operations (a resource for the resource grammar!)
|
||||||
|
<LI><CODE>MorphoGer</CODE>: complete inflection engine
|
||||||
</UL>
|
</UL>
|
||||||
|
|
||||||
<P>
|
<P>
|
||||||
@@ -439,7 +414,7 @@ the application grammarian may need to use, e.g.
|
|||||||
<P>
|
<P>
|
||||||
These constants are defined in terms of parameter types and constructors
|
These constants are defined in terms of parameter types and constructors
|
||||||
in <CODE>ResGer</CODE> and <CODE>MorphoGer</CODE>, which modules are are not
|
in <CODE>ResGer</CODE> and <CODE>MorphoGer</CODE>, which modules are are not
|
||||||
accessible to the application grammarian.
|
visible to the application grammarian.
|
||||||
</P>
|
</P>
|
||||||
<A NAME="toc10"></A>
|
<A NAME="toc10"></A>
|
||||||
<H3>Lock fields</H3>
|
<H3>Lock fields</H3>
|
||||||
@@ -509,16 +484,54 @@ use of the paradigms in <CODE>BasicGer</CODE> gives a good set of examples for
|
|||||||
those who want to build new lexica.
|
those who want to build new lexica.
|
||||||
</P>
|
</P>
|
||||||
<A NAME="toc12"></A>
|
<A NAME="toc12"></A>
|
||||||
<H2>Inside phrase category modules</H2>
|
<H2>Inside grammar modules</H2>
|
||||||
|
<P>
|
||||||
|
So far we just give links to the implementations of each API.
|
||||||
|
More explanation iś to follow - but many detail implementation tricks
|
||||||
|
are only found in the cooments of the modules.
|
||||||
|
</P>
|
||||||
<A NAME="toc13"></A>
|
<A NAME="toc13"></A>
|
||||||
<H3>Noun</H3>
|
<H3>The category system</H3>
|
||||||
|
<UL>
|
||||||
|
<LI><A HREF="gfdoc/Cat.html">Cat</A>, <A HREF="gfdoc/CatGer.html">CatGer</A>
|
||||||
|
</UL>
|
||||||
|
|
||||||
<A NAME="toc14"></A>
|
<A NAME="toc14"></A>
|
||||||
<H3>Verb</H3>
|
<H3>Phrase category modules</H3>
|
||||||
|
<UL>
|
||||||
|
<LI><A HREF="gfdoc/Tense.html">Tense</A>, <A HREF="../german/TenseGer.gf">TenseGer</A>
|
||||||
|
<LI><A HREF="gfdoc/Noun.html">Noun</A>, <A HREF="../german/NounGer.gf">NounGer</A>
|
||||||
|
<LI><A HREF="gfdoc/Adjective.html">Adjective</A>, <A HREF="../german/AdjectiveGer.gf">AdjectiveGer</A>
|
||||||
|
<LI><A HREF="gfdoc/Verb.html">Verb</A>, <A HREF="../german/VerbGer.gf">VerbGer</A>
|
||||||
|
<LI><A HREF="gfdoc/Adverb.html">Adverb</A>, <A HREF="../german/AdverbGer.gf">AdverbGer</A>
|
||||||
|
<LI><A HREF="gfdoc/Numeral.html">Numeral</A>, <A HREF="../german/NumeralGer.gf">NumeralGer</A>
|
||||||
|
<LI><A HREF="gfdoc/Sentence.html">Sentence</A>, <A HREF="../german/SentenceGer.gf">SentenceGer</A>
|
||||||
|
<LI><A HREF="gfdoc/Question.html">Question</A>, <A HREF="../german/QuestionGer.gf">QuestionGer</A>
|
||||||
|
<LI><A HREF="gfdoc/Relative.html">Relative</A>, <A HREF="../german/RelativeGer.gf">RelativeGer</A>
|
||||||
|
<LI><A HREF="gfdoc/Conjunction.html">Conjunction</A>, <A HREF="../german/ConjunctionGer.gf">ConjunctionGer</A>
|
||||||
|
<LI><A HREF="gfdoc/Phrase.html">Phrase</A>, <A HREF="../german/PhraseGer.gf">PhraseGer</A>
|
||||||
|
<LI><A HREF="gfdoc/Lang.html">Lang</A>, <A HREF="../german/LangGer.gf">LangGer</A>
|
||||||
|
</UL>
|
||||||
|
|
||||||
<A NAME="toc15"></A>
|
<A NAME="toc15"></A>
|
||||||
<H3>Adjective</H3>
|
<H3>Resource modules</H3>
|
||||||
|
<UL>
|
||||||
|
<LI><A HREF="../german/ParamGer.gf">ParamGer</A>
|
||||||
|
<LI><A HREF="../german/ResGer.gf">ResGer</A>
|
||||||
|
<LI><A HREF="../german/MorphoGer.gf">MorphoGer</A>
|
||||||
|
<LI><A HREF="gfdoc/ParadigmsGer.html">ParadigmsGer</A>, <A HREF="../german/ParadigmsGer.gf">ParadigmsGer.gf</A>
|
||||||
|
</UL>
|
||||||
|
|
||||||
<A NAME="toc16"></A>
|
<A NAME="toc16"></A>
|
||||||
<H2>Lexicon extension</H2>
|
<H3>Lexicon</H3>
|
||||||
|
<UL>
|
||||||
|
<LI><A HREF="gfdoc/Structural.html">Structural</A>, <A HREF="../german/StructuralGer.gf">StructuralGer</A>
|
||||||
|
<LI><A HREF="gfdoc/Lexicon.html">Lexicon</A>, <A HREF="../german/LexiconGer.gf">LexiconGer</A>
|
||||||
|
</UL>
|
||||||
|
|
||||||
<A NAME="toc17"></A>
|
<A NAME="toc17"></A>
|
||||||
|
<H2>Lexicon extension</H2>
|
||||||
|
<A NAME="toc18"></A>
|
||||||
<H3>The irregularity lexicon</H3>
|
<H3>The irregularity lexicon</H3>
|
||||||
<P>
|
<P>
|
||||||
It may be handy to provide a separate module of irregular
|
It may be handy to provide a separate module of irregular
|
||||||
@@ -528,7 +541,7 @@ few hundred perhaps. Building such a lexicon separately also
|
|||||||
makes it less important to cover <I>everything</I> by the
|
makes it less important to cover <I>everything</I> by the
|
||||||
worst-case paradigms (<CODE>mkV</CODE> etc).
|
worst-case paradigms (<CODE>mkV</CODE> etc).
|
||||||
</P>
|
</P>
|
||||||
<A NAME="toc18"></A>
|
<A NAME="toc19"></A>
|
||||||
<H3>Lexicon extraction from a word list</H3>
|
<H3>Lexicon extraction from a word list</H3>
|
||||||
<P>
|
<P>
|
||||||
You can often find resources such as lists of
|
You can often find resources such as lists of
|
||||||
@@ -538,10 +551,10 @@ page gives a list of verbs in the
|
|||||||
traditional tabular format, which begins as follows:
|
traditional tabular format, which begins as follows:
|
||||||
</P>
|
</P>
|
||||||
<PRE>
|
<PRE>
|
||||||
backen (du bäckst, er bäckt) backte [buk] gebacken
|
backen (du bäckst, er bäckt) backte [buk] gebacken
|
||||||
befehlen (du befiehlst, er befiehlt; befiehl!) befahl (beföhle; befähle) befohlen
|
befehlen (du befiehlst, er befiehlt; befiehl!) befahl (beföhle; befähle) befohlen
|
||||||
beginnen begann (begönne; begänne) begonnen
|
beginnen begann (begönne; begänne) begonnen
|
||||||
beißen biß gebissen
|
beißen biß gebissen
|
||||||
</PRE>
|
</PRE>
|
||||||
<P>
|
<P>
|
||||||
All you have to do is to write a suitable verb paradigm
|
All you have to do is to write a suitable verb paradigm
|
||||||
@@ -563,7 +576,7 @@ When using ready-made word lists, you should think about
|
|||||||
coyright issues. Ideally, all resource grammar material should
|
coyright issues. Ideally, all resource grammar material should
|
||||||
be provided under GNU General Public License.
|
be provided under GNU General Public License.
|
||||||
</P>
|
</P>
|
||||||
<A NAME="toc19"></A>
|
<A NAME="toc20"></A>
|
||||||
<H3>Lexicon extraction from raw text data</H3>
|
<H3>Lexicon extraction from raw text data</H3>
|
||||||
<P>
|
<P>
|
||||||
This is a cheap technique to build a lexicon of thousands
|
This is a cheap technique to build a lexicon of thousands
|
||||||
@@ -571,7 +584,7 @@ of words, if text data is available in digital format.
|
|||||||
See the <A HREF="http://www.cs.chalmers.se/~markus/FM/">Functional Morphology</A>
|
See the <A HREF="http://www.cs.chalmers.se/~markus/FM/">Functional Morphology</A>
|
||||||
homepage for details.
|
homepage for details.
|
||||||
</P>
|
</P>
|
||||||
<A NAME="toc20"></A>
|
<A NAME="toc21"></A>
|
||||||
<H3>Extending the resource grammar API</H3>
|
<H3>Extending the resource grammar API</H3>
|
||||||
<P>
|
<P>
|
||||||
Sooner or later it will happen that the resource grammar API
|
Sooner or later it will happen that the resource grammar API
|
||||||
@@ -580,7 +593,7 @@ that it does not include idiomatic expressions in a given language.
|
|||||||
The solution then is in the first place to build language-specific
|
The solution then is in the first place to build language-specific
|
||||||
extension modules. This chapter will deal with this issue.
|
extension modules. This chapter will deal with this issue.
|
||||||
</P>
|
</P>
|
||||||
<A NAME="toc21"></A>
|
<A NAME="toc22"></A>
|
||||||
<H2>Writing an instance of parametrized resource grammar implementation</H2>
|
<H2>Writing an instance of parametrized resource grammar implementation</H2>
|
||||||
<P>
|
<P>
|
||||||
Above we have looked at how a resource implementation is built by
|
Above we have looked at how a resource implementation is built by
|
||||||
@@ -595,10 +608,10 @@ use parametrized modules. The advantages are
|
|||||||
</UL>
|
</UL>
|
||||||
|
|
||||||
<P>
|
<P>
|
||||||
In this chapter, we will look at an example: adding Portuguese to
|
In this chapter, we will look at an example: adding Italian to
|
||||||
the Romance family.
|
the Romance family.
|
||||||
</P>
|
</P>
|
||||||
<A NAME="toc22"></A>
|
<A NAME="toc23"></A>
|
||||||
<H2>Parametrizing a resource grammar implementation</H2>
|
<H2>Parametrizing a resource grammar implementation</H2>
|
||||||
<P>
|
<P>
|
||||||
This is the most demanding form of resource grammar writing.
|
This is the most demanding form of resource grammar writing.
|
||||||
@@ -614,6 +627,6 @@ This chapter will work out an example of how an Estonian grammar
|
|||||||
is constructed from the Finnish grammar through parametrization.
|
is constructed from the Finnish grammar through parametrization.
|
||||||
</P>
|
</P>
|
||||||
|
|
||||||
<!-- html code generated by txt2tags 2.3 (http://txt2tags.sf.net) -->
|
<!-- html code generated by txt2tags 2.0 (http://txt2tags.sf.net) -->
|
||||||
<!-- cmdline: txt2tags -\-toc -thtml Resource-HOWTO.txt -->
|
<!-- cmdline: txt2tags -\-toc -thtml Resource-HOWTO.txt -->
|
||||||
</BODY></HTML>
|
</BODY></HTML>
|
||||||
|
|||||||
@@ -30,18 +30,8 @@ The following figure gives the dependencies of these modules.
|
|||||||
|
|
||||||
[Lang.png]
|
[Lang.png]
|
||||||
|
|
||||||
|
|
||||||
It is advisable to start with a simpler subset of the API, which
|
|
||||||
leaves out certain complicated but not always necessary things:
|
|
||||||
tenses and most part of the lexicon.
|
|
||||||
|
|
||||||
|
|
||||||
[Test.png]
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
The module structure is rather flat: almost every module is a direct
|
The module structure is rather flat: almost every module is a direct
|
||||||
parent of the top module (``Lang`` or ``Test``). The idea
|
parent of the top module ``Lang``. The idea
|
||||||
is that you can concentrate on one linguistic aspect at a time, or
|
is that you can concentrate on one linguistic aspect at a time, or
|
||||||
also distribute the work among several authors.
|
also distribute the work among several authors.
|
||||||
|
|
||||||
@@ -78,8 +68,6 @@ For instance, noun phrases, which are constructed in ``Noun``, are
|
|||||||
used as arguments of functions of almost all other phrase category modules.
|
used as arguments of functions of almost all other phrase category modules.
|
||||||
How can we build all these modules independently of each other?
|
How can we build all these modules independently of each other?
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
As usual in typeful programming, the //only// thing you need to know
|
As usual in typeful programming, the //only// thing you need to know
|
||||||
about an object you use is its type. When writing a linearization rule
|
about an object you use is its type. When writing a linearization rule
|
||||||
for a GF abstract syntax function, the only thing you need to know is
|
for a GF abstract syntax function, the only thing you need to know is
|
||||||
@@ -99,19 +87,6 @@ English, for instance, most categories do have this linearization type!
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
As a slight asymmetry in the module diagrams, you find the following
|
|
||||||
modules:
|
|
||||||
|
|
||||||
- ``Tense``: defines the parameters of polarity, anteriority, and tense
|
|
||||||
- ``Tensed``: defines how sentences use those parameters
|
|
||||||
- ``Untensed``: makes sentences use the polarity parameter only
|
|
||||||
|
|
||||||
|
|
||||||
The full resource API (``Lang``) uses ``Tensed``, whereas the
|
|
||||||
restricted ``Test`` API uses ``Untensed``.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
===Lexical modules===
|
===Lexical modules===
|
||||||
|
|
||||||
What is lexical and what is syntactic is not as clearcut in GF as in
|
What is lexical and what is syntactic is not as clearcut in GF as in
|
||||||
@@ -121,34 +96,22 @@ that the ``lin`` consists of only one token (or of a table whose values
|
|||||||
are single tokens). Even in the restricted lexicon included in the resource
|
are single tokens). Even in the restricted lexicon included in the resource
|
||||||
API, the latter rule is sometimes violated in some languages.
|
API, the latter rule is sometimes violated in some languages.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Another characterization of lexical is that lexical units can be added
|
Another characterization of lexical is that lexical units can be added
|
||||||
almost //ad libitum//, and they cannot be defined in terms of already
|
almost //ad libitum//, and they cannot be defined in terms of already
|
||||||
given rules. The lexical modules of the resource API are thus more like
|
given rules. The lexical modules of the resource API are thus more like
|
||||||
samples than complete lists. There are three such modules:
|
samples than complete lists. There are two such modules:
|
||||||
|
|
||||||
- ``Structural``: structural words (determiners, conjunctions,...)
|
- ``Structural``: structural words (determiners, conjunctions,...)
|
||||||
- ``Basic``: basic everyday content words (nouns, verbs,...)
|
- ``Lexicon``: basic everyday content words (nouns, verbs,...)
|
||||||
- ``Lex``: a very small sample of both structural and content words
|
|
||||||
|
|
||||||
|
|
||||||
The module ``Structural`` aims for completeness, and is likely to
|
The module ``Structural`` aims for completeness, and is likely to
|
||||||
be extended in future releases of the resource. The module ``Basic``
|
be extended in future releases of the resource. The module ``Lexicon``
|
||||||
gives a "random" list of words, which enable interesting testing of syntax,
|
gives a "random" list of words, which enable interesting testing of syntax,
|
||||||
and also a check list for morphology, since those words are likely to include
|
and also a check list for morphology, since those words are likely to include
|
||||||
most morphological patterns of the language.
|
most morphological patterns of the language.
|
||||||
|
|
||||||
|
In the case of ``Lexicon`` it may come out clearer than anywhere else
|
||||||
|
|
||||||
The module ``Lex`` is used in ``Test`` instead of the two
|
|
||||||
larger modules. Its purpose is to provide a quick way to test the
|
|
||||||
syntactic structures of the phrase category modules without having to implement
|
|
||||||
the larger lexica.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
In the case of ``Basic`` it may come out clearer than anywhere else
|
|
||||||
in the API that it is impossible to give exact translation equivalents in
|
in the API that it is impossible to give exact translation equivalents in
|
||||||
different languages on the level of a resource grammar. In other words,
|
different languages on the level of a resource grammar. In other words,
|
||||||
application grammars are likely to use the resource in different ways for
|
application grammars are likely to use the resource in different ways for
|
||||||
@@ -215,9 +178,9 @@ of resource v. 1.0.
|
|||||||
lines in the previous step) - but you uncommenting the first
|
lines in the previous step) - but you uncommenting the first
|
||||||
and the last lines will actually do the job for many of the files.
|
and the last lines will actually do the job for many of the files.
|
||||||
|
|
||||||
+ Now you can open the grammar ``TestGer`` in GF:
|
+ Now you can open the grammar ``LangGer`` in GF:
|
||||||
```
|
```
|
||||||
gf TestGer.gf
|
gf LangGer.gf
|
||||||
```
|
```
|
||||||
You will get lots of warnings on missing rules, but the grammar will compile.
|
You will get lots of warnings on missing rules, but the grammar will compile.
|
||||||
|
|
||||||
@@ -228,7 +191,7 @@ of resource v. 1.0.
|
|||||||
```
|
```
|
||||||
tells you what exactly is missing.
|
tells you what exactly is missing.
|
||||||
|
|
||||||
Here is the module structure of ``TestGer``. It has been simplified by leaving out
|
Here is the module structure of ``LangGer``. It has been simplified by leaving out
|
||||||
the majority of the phrase category modules. Each of them has the same dependencies
|
the majority of the phrase category modules. Each of them has the same dependencies
|
||||||
as e.g. ``VerbGer``.
|
as e.g. ``VerbGer``.
|
||||||
|
|
||||||
@@ -255,7 +218,7 @@ only one. So you will find yourself iterating the following steps:
|
|||||||
|
|
||||||
+ To be able to test the construction,
|
+ To be able to test the construction,
|
||||||
define some words you need to instantiate it
|
define some words you need to instantiate it
|
||||||
in ``LexGer``. Again, it can be helpful to define some simple-minded
|
in ``LexiconGer``. Again, it can be helpful to define some simple-minded
|
||||||
morphological paradigms in ``ResGer``, in particular worst-case
|
morphological paradigms in ``ResGer``, in particular worst-case
|
||||||
constructors corresponding to e.g.
|
constructors corresponding to e.g.
|
||||||
``ResEng.mkNoun``.
|
``ResEng.mkNoun``.
|
||||||
@@ -266,8 +229,8 @@ only one. So you will find yourself iterating the following steps:
|
|||||||
cc mkNoun "Brief" "Briefe" Masc
|
cc mkNoun "Brief" "Briefe" Masc
|
||||||
```
|
```
|
||||||
|
|
||||||
+ Uncomment ``NounGer`` and ``LexGer`` in ``TestGer``,
|
+ Uncomment ``NounGer`` and ``LexiconGer`` in ``LangGer``,
|
||||||
and compile ``TestGer`` in GF. Then test by parsing, linearization,
|
and compile ``LangGer`` in GF. Then test by parsing, linearization,
|
||||||
and random generation. In particular, linearization to a table should
|
and random generation. In particular, linearization to a table should
|
||||||
be used so that you see all forms produced:
|
be used so that you see all forms produced:
|
||||||
```
|
```
|
||||||
@@ -279,30 +242,30 @@ only one. So you will find yourself iterating the following steps:
|
|||||||
|
|
||||||
|
|
||||||
You are likely to run this cycle a few times for each linearization rule
|
You are likely to run this cycle a few times for each linearization rule
|
||||||
you implement, and some hundreds of times altogether. There are 159
|
you implement, and some hundreds of times altogether. There are 66 ``cat``s and
|
||||||
``funs`` in ``Test`` (at the moment).
|
458 ``funs`` in ``Lang`` at the moment; 149 of the ``funs`` are outside the two
|
||||||
|
lexicon modules).
|
||||||
|
|
||||||
|
|
||||||
Of course, you don't need to complete one phrase category module before starting
|
Of course, you don't need to complete one phrase category module before starting
|
||||||
with the next one. Actually, a suitable subset of ``Noun``,
|
with the next one. Actually, a suitable subset of ``Noun``,
|
||||||
``Verb``, and ``Adjective`` will lead to a reasonable coverage
|
``Verb``, and ``Adjective`` will lead to a reasonable coverage
|
||||||
very soon, keep you motivated, and reveal errors.
|
very soon, keep you motivated, and reveal errors.
|
||||||
|
|
||||||
|
|
||||||
Here is a [live log ../german/log.txt] of the actual process of
|
Here is a [live log ../german/log.txt] of the actual process of
|
||||||
building the German implementation of resource API v. 1.0.
|
building the German implementation of resource API v. 1.0.
|
||||||
It is the basis of the more detailed explanations, which will
|
It is the basis of the more detailed explanations, which will
|
||||||
follow soon. (You will found out that these explanations involve
|
follow soon. (You will found out that these explanations involve
|
||||||
a rational reconstruction of the live process!)
|
a rational reconstruction of the live process! Among other things, the
|
||||||
|
API was changed during the actual process to make it more intuitive.)
|
||||||
|
|
||||||
|
|
||||||
===Resource modules used===
|
===Resource modules used===
|
||||||
|
|
||||||
These modules will be written by you.
|
These modules will be written by you.
|
||||||
|
|
||||||
- ``ResGer``: parameter types and auxiliary operations
|
- ``ParamGer``: parameter types
|
||||||
- ``MorphoGer``: complete inflection engine; not needed for ``Test``.
|
- ``ResGer``: auxiliary operations (a resource for the resource grammar!)
|
||||||
|
- ``MorphoGer``: complete inflection engine
|
||||||
|
|
||||||
|
|
||||||
These modules are language-independent and provided by the existing resource
|
These modules are language-independent and provided by the existing resource
|
||||||
@@ -389,7 +352,7 @@ the application grammarian may need to use, e.g.
|
|||||||
```
|
```
|
||||||
These constants are defined in terms of parameter types and constructors
|
These constants are defined in terms of parameter types and constructors
|
||||||
in ``ResGer`` and ``MorphoGer``, which modules are are not
|
in ``ResGer`` and ``MorphoGer``, which modules are are not
|
||||||
accessible to the application grammarian.
|
visible to the application grammarian.
|
||||||
|
|
||||||
|
|
||||||
===Lock fields===
|
===Lock fields===
|
||||||
@@ -418,16 +381,12 @@ In this way, the user of a resource grammar cannot confuse adverbs with
|
|||||||
conjunctions. In other words, the lock fields force the type checker
|
conjunctions. In other words, the lock fields force the type checker
|
||||||
to function as grammaticality checker.
|
to function as grammaticality checker.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
When the resource grammar is ``open``ed in an application grammar, the
|
When the resource grammar is ``open``ed in an application grammar, the
|
||||||
lock fields are never seen (except possibly in type error messages),
|
lock fields are never seen (except possibly in type error messages),
|
||||||
and the application grammarian should never write them herself. If she
|
and the application grammarian should never write them herself. If she
|
||||||
has to do this, it is a sign that the resource grammar is incomplete, and
|
has to do this, it is a sign that the resource grammar is incomplete, and
|
||||||
the proper way to proceed is to fix the resource grammar.
|
the proper way to proceed is to fix the resource grammar.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
The resource grammarian has to provide the dummy lock field values
|
The resource grammarian has to provide the dummy lock field values
|
||||||
in her hidden definitions of constants in ``Paradigms``. For instance,
|
in her hidden definitions of constants in ``Paradigms``. For instance,
|
||||||
```
|
```
|
||||||
@@ -456,13 +415,46 @@ those who want to build new lexica.
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
==Inside phrase category modules==
|
==Inside grammar modules==
|
||||||
|
|
||||||
===Noun===
|
So far we just give links to the implementations of each API.
|
||||||
|
More explanation iś to follow - but many detail implementation tricks
|
||||||
|
are only found in the cooments of the modules.
|
||||||
|
|
||||||
===Verb===
|
|
||||||
|
|
||||||
===Adjective===
|
===The category system===
|
||||||
|
|
||||||
|
- [Cat gfdoc/Cat.html], [CatGer gfdoc/CatGer.html]
|
||||||
|
|
||||||
|
|
||||||
|
===Phrase category modules===
|
||||||
|
|
||||||
|
- [Tense gfdoc/Tense.html], [TenseGer ../german/TenseGer.gf]
|
||||||
|
- [Noun gfdoc/Noun.html], [NounGer ../german/NounGer.gf]
|
||||||
|
- [Adjective gfdoc/Adjective.html], [AdjectiveGer ../german/AdjectiveGer.gf]
|
||||||
|
- [Verb gfdoc/Verb.html], [VerbGer ../german/VerbGer.gf]
|
||||||
|
- [Adverb gfdoc/Adverb.html], [AdverbGer ../german/AdverbGer.gf]
|
||||||
|
- [Numeral gfdoc/Numeral.html], [NumeralGer ../german/NumeralGer.gf]
|
||||||
|
- [Sentence gfdoc/Sentence.html], [SentenceGer ../german/SentenceGer.gf]
|
||||||
|
- [Question gfdoc/Question.html], [QuestionGer ../german/QuestionGer.gf]
|
||||||
|
- [Relative gfdoc/Relative.html], [RelativeGer ../german/RelativeGer.gf]
|
||||||
|
- [Conjunction gfdoc/Conjunction.html], [ConjunctionGer ../german/ConjunctionGer.gf]
|
||||||
|
- [Phrase gfdoc/Phrase.html], [PhraseGer ../german/PhraseGer.gf]
|
||||||
|
- [Lang gfdoc/Lang.html], [LangGer ../german/LangGer.gf]
|
||||||
|
|
||||||
|
|
||||||
|
===Resource modules===
|
||||||
|
|
||||||
|
- [ParamGer ../german/ParamGer.gf]
|
||||||
|
- [ResGer ../german/ResGer.gf]
|
||||||
|
- [MorphoGer ../german/MorphoGer.gf]
|
||||||
|
- [ParadigmsGer gfdoc/ParadigmsGer.html], [ParadigmsGer.gf ../german/ParadigmsGer.gf]
|
||||||
|
|
||||||
|
|
||||||
|
===Lexicon===
|
||||||
|
|
||||||
|
- [Structural gfdoc/Structural.html], [StructuralGer ../german/StructuralGer.gf]
|
||||||
|
- [Lexicon gfdoc/Lexicon.html], [LexiconGer ../german/LexiconGer.gf]
|
||||||
|
|
||||||
|
|
||||||
==Lexicon extension==
|
==Lexicon extension==
|
||||||
@@ -486,10 +478,10 @@ irregular verbs on the internet. For instance, the
|
|||||||
page gives a list of verbs in the
|
page gives a list of verbs in the
|
||||||
traditional tabular format, which begins as follows:
|
traditional tabular format, which begins as follows:
|
||||||
```
|
```
|
||||||
backen (du bäckst, er bäckt) backte [buk] gebacken
|
backen (du bäckst, er bäckt) backte [buk] gebacken
|
||||||
befehlen (du befiehlst, er befiehlt; befiehl!) befahl (beföhle; befähle) befohlen
|
befehlen (du befiehlst, er befiehlt; befiehl!) befahl (beföhle; befähle) befohlen
|
||||||
beginnen begann (begönne; begänne) begonnen
|
beginnen begann (begönne; begänne) begonnen
|
||||||
beißen biß gebissen
|
beißen biß gebissen
|
||||||
```
|
```
|
||||||
All you have to do is to write a suitable verb paradigm
|
All you have to do is to write a suitable verb paradigm
|
||||||
```
|
```
|
||||||
@@ -538,7 +530,7 @@ use parametrized modules. The advantages are
|
|||||||
- practical: maintainability improves with fewer components
|
- practical: maintainability improves with fewer components
|
||||||
|
|
||||||
|
|
||||||
In this chapter, we will look at an example: adding Portuguese to
|
In this chapter, we will look at an example: adding Italian to
|
||||||
the Romance family.
|
the Romance family.
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<P ALIGN="center"><CENTER><H1>GF Resource Grammar Library v. 1.0</H1>
|
<P ALIGN="center"><CENTER><H1>GF Resource Grammar Library v. 1.0</H1>
|
||||||
<FONT SIZE="4">
|
<FONT SIZE="4">
|
||||||
<I>Author: Aarne Ranta <aarne (at) cs.chalmers.se></I><BR>
|
<I>Author: Aarne Ranta <aarne (at) cs.chalmers.se></I><BR>
|
||||||
Last update: Fri Jan 20 18:02:22 2006
|
Last update: Wed Jan 25 13:40:51 2006
|
||||||
</FONT></CENTER>
|
</FONT></CENTER>
|
||||||
|
|
||||||
<P></P>
|
<P></P>
|
||||||
@@ -43,6 +43,7 @@ The documentation of the individual modules:
|
|||||||
</P>
|
</P>
|
||||||
<UL>
|
<UL>
|
||||||
<LI><A HREF="gfdoc/Cat.html">Cat</A>: the category system
|
<LI><A HREF="gfdoc/Cat.html">Cat</A>: the category system
|
||||||
|
<LI><A HREF="gfdoc/Tense.html">Tense</A>: tense, anteriority, and polarity values
|
||||||
<LI><A HREF="gfdoc/Noun.html">Noun</A>: construction of nouns and noun phrases
|
<LI><A HREF="gfdoc/Noun.html">Noun</A>: construction of nouns and noun phrases
|
||||||
<LI><A HREF="gfdoc/Adjective.html">Adjective</A>: construction of adjectival phrases
|
<LI><A HREF="gfdoc/Adjective.html">Adjective</A>: construction of adjectival phrases
|
||||||
<LI><A HREF="gfdoc/Verb.html">Verb</A>: construction of verb phrases
|
<LI><A HREF="gfdoc/Verb.html">Verb</A>: construction of verb phrases
|
||||||
@@ -54,7 +55,7 @@ The documentation of the individual modules:
|
|||||||
<LI><A HREF="gfdoc/Conjunction.html">Conjunction</A>: coordination of phrases
|
<LI><A HREF="gfdoc/Conjunction.html">Conjunction</A>: coordination of phrases
|
||||||
<LI><A HREF="gfdoc/Phrase.html">Phrase</A>: construction of the major units of text and speech
|
<LI><A HREF="gfdoc/Phrase.html">Phrase</A>: construction of the major units of text and speech
|
||||||
<LI><A HREF="gfdoc/Structural.html">Structural</A>: a lexicon of structural words
|
<LI><A HREF="gfdoc/Structural.html">Structural</A>: a lexicon of structural words
|
||||||
<LI><A HREF="gfdoc/Basic.html">Basic</A>: a lexicon of other common words, for test purposes
|
<LI><A HREF="gfdoc/Lexicon.html">Lexicon</A>: a lexicon of other common words, for test purposes
|
||||||
<LI><A HREF="gfdoc/Lang.html">Lang</A>: the main module comprising all the others
|
<LI><A HREF="gfdoc/Lang.html">Lang</A>: the main module comprising all the others
|
||||||
</UL>
|
</UL>
|
||||||
|
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ The following figure gives the dependencies of these modules.
|
|||||||
The documentation of the individual modules:
|
The documentation of the individual modules:
|
||||||
|
|
||||||
- [Cat gfdoc/Cat.html]: the category system
|
- [Cat gfdoc/Cat.html]: the category system
|
||||||
|
- [Tense gfdoc/Tense.html]: tense, anteriority, and polarity values
|
||||||
- [Noun gfdoc/Noun.html]: construction of nouns and noun phrases
|
- [Noun gfdoc/Noun.html]: construction of nouns and noun phrases
|
||||||
- [Adjective gfdoc/Adjective.html]: construction of adjectival phrases
|
- [Adjective gfdoc/Adjective.html]: construction of adjectival phrases
|
||||||
- [Verb gfdoc/Verb.html]: construction of verb phrases
|
- [Verb gfdoc/Verb.html]: construction of verb phrases
|
||||||
@@ -39,7 +40,7 @@ The documentation of the individual modules:
|
|||||||
- [Conjunction gfdoc/Conjunction.html]: coordination of phrases
|
- [Conjunction gfdoc/Conjunction.html]: coordination of phrases
|
||||||
- [Phrase gfdoc/Phrase.html]: construction of the major units of text and speech
|
- [Phrase gfdoc/Phrase.html]: construction of the major units of text and speech
|
||||||
- [Structural gfdoc/Structural.html]: a lexicon of structural words
|
- [Structural gfdoc/Structural.html]: a lexicon of structural words
|
||||||
- [Basic gfdoc/Basic.html]: a lexicon of other common words, for test purposes
|
- [Lexicon gfdoc/Lexicon.html]: a lexicon of other common words, for test purposes
|
||||||
- [Lang gfdoc/Lang.html]: the main module comprising all the others
|
- [Lang gfdoc/Lang.html]: the main module comprising all the others
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<P ALIGN="center"><CENTER><H1> Adjectives and adjectival phrases</H1>
|
<P ALIGN="center"><CENTER><H1> Adjectives and adjectival phrases</H1>
|
||||||
<FONT SIZE="4">
|
<FONT SIZE="4">
|
||||||
<I>Author: </I><BR>
|
<I>Author: </I><BR>
|
||||||
Last update: Wed Jan 25 10:50:12 2006
|
Last update: Wed Jan 25 13:41:12 2006
|
||||||
</FONT></CENTER>
|
</FONT></CENTER>
|
||||||
|
|
||||||
<P></P>
|
<P></P>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<P ALIGN="center"><CENTER><H1> Adverbs and adverbial phrases</H1>
|
<P ALIGN="center"><CENTER><H1> Adverbs and adverbial phrases</H1>
|
||||||
<FONT SIZE="4">
|
<FONT SIZE="4">
|
||||||
<I>Author: </I><BR>
|
<I>Author: </I><BR>
|
||||||
Last update: Wed Jan 25 10:50:12 2006
|
Last update: Wed Jan 25 13:41:13 2006
|
||||||
</FONT></CENTER>
|
</FONT></CENTER>
|
||||||
|
|
||||||
<P></P>
|
<P></P>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<P ALIGN="center"><CENTER><H1> The category system</H1>
|
<P ALIGN="center"><CENTER><H1> The category system</H1>
|
||||||
<FONT SIZE="4">
|
<FONT SIZE="4">
|
||||||
<I>Author: </I><BR>
|
<I>Author: </I><BR>
|
||||||
Last update: Wed Jan 25 10:50:12 2006
|
Last update: Wed Jan 25 13:41:13 2006
|
||||||
</FONT></CENTER>
|
</FONT></CENTER>
|
||||||
|
|
||||||
<P></P>
|
<P></P>
|
||||||
@@ -17,17 +17,16 @@ Last update: Wed Jan 25 10:50:12 2006
|
|||||||
<LI><A HREF="#toc1">The category system</A>
|
<LI><A HREF="#toc1">The category system</A>
|
||||||
<UL>
|
<UL>
|
||||||
<LI><A HREF="#toc2">Top-level units</A>
|
<LI><A HREF="#toc2">Top-level units</A>
|
||||||
<LI><A HREF="#toc3">Tensed sentences</A>
|
<LI><A HREF="#toc3">Sentences and clauses</A>
|
||||||
<LI><A HREF="#toc4">Clauses</A>
|
<LI><A HREF="#toc4">Questions and interrogatives</A>
|
||||||
<LI><A HREF="#toc5">Questions and interrogatives</A>
|
<LI><A HREF="#toc5">Relative clauses and pronouns</A>
|
||||||
<LI><A HREF="#toc6">Relative clauses and pronouns</A>
|
<LI><A HREF="#toc6">Verb phrases</A>
|
||||||
<LI><A HREF="#toc7">Verb phrases</A>
|
<LI><A HREF="#toc7">Adjectival phrases</A>
|
||||||
<LI><A HREF="#toc8">Adjectival phrases</A>
|
<LI><A HREF="#toc8">Nouns and noun phrases</A>
|
||||||
<LI><A HREF="#toc9">Nouns and noun phrases</A>
|
<LI><A HREF="#toc9">Adverbs</A>
|
||||||
<LI><A HREF="#toc10">Adverbs</A>
|
<LI><A HREF="#toc10">Numerals</A>
|
||||||
<LI><A HREF="#toc11">Numerals</A>
|
<LI><A HREF="#toc11">Structural words</A>
|
||||||
<LI><A HREF="#toc12">Structural words</A>
|
<LI><A HREF="#toc12">Words of open classes</A>
|
||||||
<LI><A HREF="#toc13">Words of open classes</A>
|
|
||||||
</UL>
|
</UL>
|
||||||
</UL>
|
</UL>
|
||||||
|
|
||||||
@@ -42,7 +41,7 @@ gfdoc - a rudimentary GF document generator.
|
|||||||
<A NAME="toc1"></A>
|
<A NAME="toc1"></A>
|
||||||
<H1>The category system</H1>
|
<H1>The category system</H1>
|
||||||
<PRE>
|
<PRE>
|
||||||
abstract Cat = {
|
abstract Cat = Tense ** {
|
||||||
|
|
||||||
cat
|
cat
|
||||||
</PRE>
|
</PRE>
|
||||||
@@ -60,30 +59,21 @@ Constructed in <A HREF="Phrase.html">Phrase</A>.
|
|||||||
</PRE>
|
</PRE>
|
||||||
<P></P>
|
<P></P>
|
||||||
<A NAME="toc3"></A>
|
<A NAME="toc3"></A>
|
||||||
<H2>Tensed sentences</H2>
|
<H2>Sentences and clauses</H2>
|
||||||
<P>
|
<P>
|
||||||
Constructed in <A HREF="Tensed.html">Tensed</A>.
|
Constructed in <A HREF="Sentence.html">Sentence</A>.
|
||||||
A simplified variant, with just present forms, is <A HREF="Untensed.html">Untensed</A>.
|
|
||||||
</P>
|
</P>
|
||||||
<PRE>
|
<PRE>
|
||||||
S ; -- declarative sentence e.g. "she lived here"
|
S ; -- declarative sentence e.g. "she lived here"
|
||||||
QS ; -- question e.g. "where did she live"
|
QS ; -- question e.g. "where did she live"
|
||||||
RS ; -- relative e.g. "in which she lived"
|
RS ; -- relative e.g. "in which she lived"
|
||||||
</PRE>
|
|
||||||
<P></P>
|
|
||||||
<A NAME="toc4"></A>
|
|
||||||
<H2>Clauses</H2>
|
|
||||||
<P>
|
|
||||||
Constructed in <A HREF="Sentence.html">Sentence</A>.
|
|
||||||
</P>
|
|
||||||
<PRE>
|
|
||||||
Cl ; -- declarative clause, with all tenses e.g. "she looks at this"
|
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"
|
Slash ; -- clause missing NP (S/NP in GPSG) e.g. "she looks at"
|
||||||
Imp ; -- imperative e.g. "look at this"
|
Imp ; -- imperative e.g. "look at this"
|
||||||
SC ; -- embedded sentence or question e.g. "that it rains"
|
SC ; -- embedded sentence or question e.g. "that it rains"
|
||||||
</PRE>
|
</PRE>
|
||||||
<P></P>
|
<P></P>
|
||||||
<A NAME="toc5"></A>
|
<A NAME="toc4"></A>
|
||||||
<H2>Questions and interrogatives</H2>
|
<H2>Questions and interrogatives</H2>
|
||||||
<P>
|
<P>
|
||||||
Constructed in <A HREF="Question.html">Question</A>.
|
Constructed in <A HREF="Question.html">Question</A>.
|
||||||
@@ -95,7 +85,7 @@ Constructed in <A HREF="Question.html">Question</A>.
|
|||||||
IDet ; -- interrogative determiner e.g. "which"
|
IDet ; -- interrogative determiner e.g. "which"
|
||||||
</PRE>
|
</PRE>
|
||||||
<P></P>
|
<P></P>
|
||||||
<A NAME="toc6"></A>
|
<A NAME="toc5"></A>
|
||||||
<H2>Relative clauses and pronouns</H2>
|
<H2>Relative clauses and pronouns</H2>
|
||||||
<P>
|
<P>
|
||||||
Constructed in <A HREF="Relative.html">Relative</A>.
|
Constructed in <A HREF="Relative.html">Relative</A>.
|
||||||
@@ -105,7 +95,7 @@ Constructed in <A HREF="Relative.html">Relative</A>.
|
|||||||
RP ; -- relative pronoun e.g. "in which"
|
RP ; -- relative pronoun e.g. "in which"
|
||||||
</PRE>
|
</PRE>
|
||||||
<P></P>
|
<P></P>
|
||||||
<A NAME="toc7"></A>
|
<A NAME="toc6"></A>
|
||||||
<H2>Verb phrases</H2>
|
<H2>Verb phrases</H2>
|
||||||
<P>
|
<P>
|
||||||
Constructed in <A HREF="Verb.html">Verb</A>.
|
Constructed in <A HREF="Verb.html">Verb</A>.
|
||||||
@@ -115,7 +105,7 @@ Constructed in <A HREF="Verb.html">Verb</A>.
|
|||||||
Comp ; -- complement of copula, such as AP e.g. "very warm"
|
Comp ; -- complement of copula, such as AP e.g. "very warm"
|
||||||
</PRE>
|
</PRE>
|
||||||
<P></P>
|
<P></P>
|
||||||
<A NAME="toc8"></A>
|
<A NAME="toc7"></A>
|
||||||
<H2>Adjectival phrases</H2>
|
<H2>Adjectival phrases</H2>
|
||||||
<P>
|
<P>
|
||||||
Constructed in <A HREF="Adjective.html">Adjective</A>.
|
Constructed in <A HREF="Adjective.html">Adjective</A>.
|
||||||
@@ -124,7 +114,7 @@ Constructed in <A HREF="Adjective.html">Adjective</A>.
|
|||||||
AP ; -- adjectival phrase e.g. "very warm"
|
AP ; -- adjectival phrase e.g. "very warm"
|
||||||
</PRE>
|
</PRE>
|
||||||
<P></P>
|
<P></P>
|
||||||
<A NAME="toc9"></A>
|
<A NAME="toc8"></A>
|
||||||
<H2>Nouns and noun phrases</H2>
|
<H2>Nouns and noun phrases</H2>
|
||||||
<P>
|
<P>
|
||||||
Constructed in <A HREF="Noun.html">Noun</A>.
|
Constructed in <A HREF="Noun.html">Noun</A>.
|
||||||
@@ -150,7 +140,7 @@ as defined in <A HREF="Noun.html">Noun</A>.
|
|||||||
Ord ; -- ordinal number (used in Det) e.g. "seventh"
|
Ord ; -- ordinal number (used in Det) e.g. "seventh"
|
||||||
</PRE>
|
</PRE>
|
||||||
<P></P>
|
<P></P>
|
||||||
<A NAME="toc10"></A>
|
<A NAME="toc9"></A>
|
||||||
<H2>Adverbs</H2>
|
<H2>Adverbs</H2>
|
||||||
<P>
|
<P>
|
||||||
Constructed in <A HREF="Adverb.html">Adverb</A>.
|
Constructed in <A HREF="Adverb.html">Adverb</A>.
|
||||||
@@ -163,7 +153,7 @@ Many adverbs are constructed in <A HREF="Structural.html">Structural</A>.
|
|||||||
AdN ; -- numeral-modifying adverb, e.g. "more than"
|
AdN ; -- numeral-modifying adverb, e.g. "more than"
|
||||||
</PRE>
|
</PRE>
|
||||||
<P></P>
|
<P></P>
|
||||||
<A NAME="toc11"></A>
|
<A NAME="toc10"></A>
|
||||||
<H2>Numerals</H2>
|
<H2>Numerals</H2>
|
||||||
<P>
|
<P>
|
||||||
Constructed in <A HREF="Numeral.html">Numeral</A>.
|
Constructed in <A HREF="Numeral.html">Numeral</A>.
|
||||||
@@ -172,7 +162,7 @@ Constructed in <A HREF="Numeral.html">Numeral</A>.
|
|||||||
Numeral;-- cardinal or ordinal, e.g. "five/fifth"
|
Numeral;-- cardinal or ordinal, e.g. "five/fifth"
|
||||||
</PRE>
|
</PRE>
|
||||||
<P></P>
|
<P></P>
|
||||||
<A NAME="toc12"></A>
|
<A NAME="toc11"></A>
|
||||||
<H2>Structural words</H2>
|
<H2>Structural words</H2>
|
||||||
<P>
|
<P>
|
||||||
Constructed in <A HREF="Structural.html">Structural</A>.
|
Constructed in <A HREF="Structural.html">Structural</A>.
|
||||||
@@ -186,10 +176,10 @@ Constructed in <A HREF="Structural.html">Structural</A>.
|
|||||||
Prep ; -- preposition, or just case e.g. "in"
|
Prep ; -- preposition, or just case e.g. "in"
|
||||||
</PRE>
|
</PRE>
|
||||||
<P></P>
|
<P></P>
|
||||||
<A NAME="toc13"></A>
|
<A NAME="toc12"></A>
|
||||||
<H2>Words of open classes</H2>
|
<H2>Words of open classes</H2>
|
||||||
<P>
|
<P>
|
||||||
These are constructed in <A HREF="Basic.html">Basic</A> and in additional lexicon modules.
|
These are constructed in <A HREF="Lexicon.html">Lexicon</A> and in additional lexicon modules.
|
||||||
</P>
|
</P>
|
||||||
<PRE>
|
<PRE>
|
||||||
V ; -- one-place verb e.g. "sleep"
|
V ; -- one-place verb e.g. "sleep"
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<P ALIGN="center"><CENTER><H1> Coordination</H1>
|
<P ALIGN="center"><CENTER><H1> Coordination</H1>
|
||||||
<FONT SIZE="4">
|
<FONT SIZE="4">
|
||||||
<I>Author: </I><BR>
|
<I>Author: </I><BR>
|
||||||
Last update: Wed Jan 25 10:50:13 2006
|
Last update: Wed Jan 25 13:41:13 2006
|
||||||
</FONT></CENTER>
|
</FONT></CENTER>
|
||||||
|
|
||||||
<P></P>
|
<P></P>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<P ALIGN="center"><CENTER><H1> The Main Module of the Resource Grammar</H1>
|
<P ALIGN="center"><CENTER><H1> The Main Module of the Resource Grammar</H1>
|
||||||
<FONT SIZE="4">
|
<FONT SIZE="4">
|
||||||
<I>Author: </I><BR>
|
<I>Author: </I><BR>
|
||||||
Last update: Wed Jan 25 10:50:13 2006
|
Last update: Wed Jan 25 13:41:13 2006
|
||||||
</FONT></CENTER>
|
</FONT></CENTER>
|
||||||
|
|
||||||
<P></P>
|
<P></P>
|
||||||
@@ -44,9 +44,8 @@ grammar. A smaller top module is <A HREF="Test.html">Test</A>.
|
|||||||
Relative,
|
Relative,
|
||||||
Conjunction,
|
Conjunction,
|
||||||
Phrase,
|
Phrase,
|
||||||
Tensed,
|
|
||||||
Structural,
|
Structural,
|
||||||
Basic
|
Lexicon
|
||||||
** {} ;
|
** {} ;
|
||||||
</PRE>
|
</PRE>
|
||||||
<P></P>
|
<P></P>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<P ALIGN="center"><CENTER><H1> Symbolic expressions</H1>
|
<P ALIGN="center"><CENTER><H1> Symbolic expressions</H1>
|
||||||
<FONT SIZE="4">
|
<FONT SIZE="4">
|
||||||
<I>Author: </I><BR>
|
<I>Author: </I><BR>
|
||||||
Last update: Wed Jan 25 10:50:13 2006
|
Last update: Wed Jan 25 13:41:13 2006
|
||||||
</FONT></CENTER>
|
</FONT></CENTER>
|
||||||
|
|
||||||
<P></P>
|
<P></P>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<P ALIGN="center"><CENTER><H1> The construction of nouns, noun phrases, and determiners</H1>
|
<P ALIGN="center"><CENTER><H1> The construction of nouns, noun phrases, and determiners</H1>
|
||||||
<FONT SIZE="4">
|
<FONT SIZE="4">
|
||||||
<I>Author: </I><BR>
|
<I>Author: </I><BR>
|
||||||
Last update: Wed Jan 25 10:50:13 2006
|
Last update: Wed Jan 25 13:41:13 2006
|
||||||
</FONT></CENTER>
|
</FONT></CENTER>
|
||||||
|
|
||||||
<P></P>
|
<P></P>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<P ALIGN="center"><CENTER><H1> Numerals</H1>
|
<P ALIGN="center"><CENTER><H1> Numerals</H1>
|
||||||
<FONT SIZE="4">
|
<FONT SIZE="4">
|
||||||
<I>Author: </I><BR>
|
<I>Author: </I><BR>
|
||||||
Last update: Wed Jan 25 10:50:13 2006
|
Last update: Wed Jan 25 13:41:14 2006
|
||||||
</FONT></CENTER>
|
</FONT></CENTER>
|
||||||
|
|
||||||
<P></P>
|
<P></P>
|
||||||
|
|||||||
@@ -43,7 +43,7 @@
|
|||||||
<P></P>
|
<P></P>
|
||||||
<P>
|
<P>
|
||||||
Author:
|
Author:
|
||||||
Last update: Wed Jan 25 10:50:14 2006
|
Last update: Wed Jan 25 13:41:15 2006
|
||||||
</P>
|
</P>
|
||||||
<P>
|
<P>
|
||||||
Produced by
|
Produced by
|
||||||
|
|||||||
@@ -41,7 +41,7 @@
|
|||||||
<P></P>
|
<P></P>
|
||||||
<P>
|
<P>
|
||||||
Author:
|
Author:
|
||||||
Last update: Wed Jan 25 10:50:15 2006
|
Last update: Wed Jan 25 13:41:15 2006
|
||||||
</P>
|
</P>
|
||||||
<P>
|
<P>
|
||||||
Produced by
|
Produced by
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
<P></P>
|
<P></P>
|
||||||
<P>
|
<P>
|
||||||
Author:
|
Author:
|
||||||
Last update: Wed Jan 25 10:50:15 2006
|
Last update: Wed Jan 25 13:41:15 2006
|
||||||
</P>
|
</P>
|
||||||
<P>
|
<P>
|
||||||
Produced by
|
Produced by
|
||||||
|
|||||||
@@ -43,7 +43,7 @@
|
|||||||
<P></P>
|
<P></P>
|
||||||
<P>
|
<P>
|
||||||
Author:
|
Author:
|
||||||
Last update: Wed Jan 25 10:50:15 2006
|
Last update: Wed Jan 25 13:41:15 2006
|
||||||
</P>
|
</P>
|
||||||
<P>
|
<P>
|
||||||
Produced by
|
Produced by
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<P ALIGN="center"><CENTER><H1> Phrases and utterances</H1>
|
<P ALIGN="center"><CENTER><H1> Phrases and utterances</H1>
|
||||||
<FONT SIZE="4">
|
<FONT SIZE="4">
|
||||||
<I>Author: </I><BR>
|
<I>Author: </I><BR>
|
||||||
Last update: Wed Jan 25 10:50:13 2006
|
Last update: Wed Jan 25 13:41:14 2006
|
||||||
</FONT></CENTER>
|
</FONT></CENTER>
|
||||||
|
|
||||||
<P></P>
|
<P></P>
|
||||||
@@ -28,7 +28,7 @@ gfdoc - a rudimentary GF document generator.
|
|||||||
<A NAME="toc1"></A>
|
<A NAME="toc1"></A>
|
||||||
<H1>Phrases and utterances</H1>
|
<H1>Phrases and utterances</H1>
|
||||||
<PRE>
|
<PRE>
|
||||||
abstract Phrase = Cat, Tense ** {
|
abstract Phrase = Cat ** {
|
||||||
</PRE>
|
</PRE>
|
||||||
<P></P>
|
<P></P>
|
||||||
<P>
|
<P>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<P ALIGN="center"><CENTER><H1> Questions and interrogative pronouns</H1>
|
<P ALIGN="center"><CENTER><H1> Questions and interrogative pronouns</H1>
|
||||||
<FONT SIZE="4">
|
<FONT SIZE="4">
|
||||||
<I>Author: </I><BR>
|
<I>Author: </I><BR>
|
||||||
Last update: Wed Jan 25 10:50:13 2006
|
Last update: Wed Jan 25 13:41:14 2006
|
||||||
</FONT></CENTER>
|
</FONT></CENTER>
|
||||||
|
|
||||||
<P></P>
|
<P></P>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<P ALIGN="center"><CENTER><H1> Relative clauses and pronouns</H1>
|
<P ALIGN="center"><CENTER><H1> Relative clauses and pronouns</H1>
|
||||||
<FONT SIZE="4">
|
<FONT SIZE="4">
|
||||||
<I>Author: </I><BR>
|
<I>Author: </I><BR>
|
||||||
Last update: Wed Jan 25 10:50:14 2006
|
Last update: Wed Jan 25 13:41:14 2006
|
||||||
</FONT></CENTER>
|
</FONT></CENTER>
|
||||||
|
|
||||||
<P></P>
|
<P></P>
|
||||||
|
|||||||
@@ -2,24 +2,25 @@
|
|||||||
<HTML>
|
<HTML>
|
||||||
<HEAD>
|
<HEAD>
|
||||||
<META NAME="generator" CONTENT="http://txt2tags.sf.net">
|
<META NAME="generator" CONTENT="http://txt2tags.sf.net">
|
||||||
<TITLE> Clauses, imperatives, and sentential complements</TITLE>
|
<TITLE> Sentences, clauses, imperatives, and sentential complements</TITLE>
|
||||||
</HEAD><BODY BGCOLOR="white" TEXT="black">
|
</HEAD><BODY BGCOLOR="white" TEXT="black">
|
||||||
<P ALIGN="center"><CENTER><H1> Clauses, imperatives, and sentential complements</H1>
|
<P ALIGN="center"><CENTER><H1> Sentences, clauses, imperatives, and sentential complements</H1>
|
||||||
<FONT SIZE="4">
|
<FONT SIZE="4">
|
||||||
<I>Author: </I><BR>
|
<I>Author: </I><BR>
|
||||||
Last update: Wed Jan 25 10:50:14 2006
|
Last update: Wed Jan 25 13:41:14 2006
|
||||||
</FONT></CENTER>
|
</FONT></CENTER>
|
||||||
|
|
||||||
<P></P>
|
<P></P>
|
||||||
<HR NOSHADE SIZE=1>
|
<HR NOSHADE SIZE=1>
|
||||||
<P></P>
|
<P></P>
|
||||||
<UL>
|
<UL>
|
||||||
<LI><A HREF="#toc1">Clauses, imperatives, and sentential complements</A>
|
<LI><A HREF="#toc1">Sentences, clauses, imperatives, and sentential complements</A>
|
||||||
<UL>
|
<UL>
|
||||||
<LI><A HREF="#toc2">Clauses</A>
|
<LI><A HREF="#toc2">Clauses</A>
|
||||||
<LI><A HREF="#toc3">Clauses missing object noun phrases</A>
|
<LI><A HREF="#toc3">Clauses missing object noun phrases</A>
|
||||||
<LI><A HREF="#toc4">Imperatives</A>
|
<LI><A HREF="#toc4">Imperatives</A>
|
||||||
<LI><A HREF="#toc5">Embedded sentences</A>
|
<LI><A HREF="#toc5">Embedded sentences</A>
|
||||||
|
<LI><A HREF="#toc6">Sentences</A>
|
||||||
</UL>
|
</UL>
|
||||||
</UL>
|
</UL>
|
||||||
|
|
||||||
@@ -32,7 +33,7 @@ gfdoc - a rudimentary GF document generator.
|
|||||||
(c) Aarne Ranta (<A HREF="mailto:aarne@cs.chalmers.se">aarne@cs.chalmers.se</A>) 2002 under GNU GPL.
|
(c) Aarne Ranta (<A HREF="mailto:aarne@cs.chalmers.se">aarne@cs.chalmers.se</A>) 2002 under GNU GPL.
|
||||||
</P>
|
</P>
|
||||||
<A NAME="toc1"></A>
|
<A NAME="toc1"></A>
|
||||||
<H1>Clauses, imperatives, and sentential complements</H1>
|
<H1>Sentences, clauses, imperatives, and sentential complements</H1>
|
||||||
<PRE>
|
<PRE>
|
||||||
abstract Sentence = Cat ** {
|
abstract Sentence = Cat ** {
|
||||||
</PRE>
|
</PRE>
|
||||||
@@ -97,10 +98,45 @@ subjects and (adverbial) complements.
|
|||||||
EmbedS : S -> SC ; -- that you go
|
EmbedS : S -> SC ; -- that you go
|
||||||
EmbedQS : QS -> SC ; -- whether you go
|
EmbedQS : QS -> SC ; -- whether you go
|
||||||
EmbedVP : VP -> SC ; -- to go
|
EmbedVP : VP -> SC ; -- to go
|
||||||
|
</PRE>
|
||||||
|
<P></P>
|
||||||
|
<A NAME="toc6"></A>
|
||||||
|
<H2>Sentences</H2>
|
||||||
|
<P>
|
||||||
|
These are the 2 x 4 x 4 = 16 forms generated by different
|
||||||
|
combinations of tense, polarity, and
|
||||||
|
anteriority, which are defined in <A HREF="Tense.html">Tense</A>.
|
||||||
|
</P>
|
||||||
|
<PRE>
|
||||||
|
fun
|
||||||
|
UseCl : Tense -> Ant -> Pol -> Cl -> S ;
|
||||||
|
UseQCl : Tense -> Ant -> Pol -> QCl -> QS ;
|
||||||
|
UseRCl : Tense -> Ant -> Pol -> RCl -> RS ;
|
||||||
|
|
||||||
}
|
}
|
||||||
</PRE>
|
</PRE>
|
||||||
<P></P>
|
<P></P>
|
||||||
|
<P>
|
||||||
|
Examples for English <CODE>S</CODE>/<CODE>Cl</CODE>:
|
||||||
|
</P>
|
||||||
|
<P>
|
||||||
|
Pres Simul Pos ODir : he sleeps
|
||||||
|
Pres Simul Neg ODir : he doesn't sleep
|
||||||
|
Pres Anter Pos ODir : he has slept
|
||||||
|
Pres Anter Neg ODir : he hasn't slept
|
||||||
|
Past Simul Pos ODir : he slept
|
||||||
|
Past Simul Neg ODir : he didn't sleep
|
||||||
|
Past Anter Pos ODir : he had slept
|
||||||
|
Past Anter Neg ODir : he hadn't slept
|
||||||
|
Fut Simul Pos ODir : he will sleep
|
||||||
|
Fut Simul Neg ODir : he won't sleep
|
||||||
|
Fut Anter Pos ODir : he will have slept
|
||||||
|
Fut Anter Neg ODir : he won't have slept
|
||||||
|
Cond Simul Pos ODir : he would sleep
|
||||||
|
Cond Simul Neg ODir : he wouldn't sleep
|
||||||
|
Cond Anter Pos ODir : he would have slept
|
||||||
|
Cond Anter Neg ODir : he wouldn't have slept
|
||||||
|
</P>
|
||||||
|
|
||||||
<!-- html code generated by txt2tags 2.0 (http://txt2tags.sf.net) -->
|
<!-- html code generated by txt2tags 2.0 (http://txt2tags.sf.net) -->
|
||||||
<!-- cmdline: txt2tags -thtml -\-toc abstract/Sentence.txt -->
|
<!-- cmdline: txt2tags -thtml -\-toc abstract/Sentence.txt -->
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<P ALIGN="center"><CENTER><H1> GF Resource Grammar API for Structural Words</H1>
|
<P ALIGN="center"><CENTER><H1> GF Resource Grammar API for Structural Words</H1>
|
||||||
<FONT SIZE="4">
|
<FONT SIZE="4">
|
||||||
<I>Author: </I><BR>
|
<I>Author: </I><BR>
|
||||||
Last update: Wed Jan 25 10:50:14 2006
|
Last update: Wed Jan 25 13:41:14 2006
|
||||||
</FONT></CENTER>
|
</FONT></CENTER>
|
||||||
|
|
||||||
<P></P>
|
<P></P>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<P ALIGN="center"><CENTER><H1> Tense, Polarity, and Anteriority</H1>
|
<P ALIGN="center"><CENTER><H1> Tense, Polarity, and Anteriority</H1>
|
||||||
<FONT SIZE="4">
|
<FONT SIZE="4">
|
||||||
<I>Author: </I><BR>
|
<I>Author: </I><BR>
|
||||||
Last update: Wed Jan 25 10:50:14 2006
|
Last update: Wed Jan 25 13:41:14 2006
|
||||||
</FONT></CENTER>
|
</FONT></CENTER>
|
||||||
|
|
||||||
<P></P>
|
<P></P>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<P ALIGN="center"><CENTER><H1> The construction of verb phrases</H1>
|
<P ALIGN="center"><CENTER><H1> The construction of verb phrases</H1>
|
||||||
<FONT SIZE="4">
|
<FONT SIZE="4">
|
||||||
<I>Author: </I><BR>
|
<I>Author: </I><BR>
|
||||||
Last update: Wed Jan 25 10:50:14 2006
|
Last update: Wed Jan 25 13:41:15 2006
|
||||||
</FONT></CENTER>
|
</FONT></CENTER>
|
||||||
|
|
||||||
<P></P>
|
<P></P>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
concrete CatEng of Cat = open ResEng, Prelude in {
|
concrete CatEng of Cat = TenseX ** open ResEng, Prelude in {
|
||||||
|
|
||||||
flags optimize=all_subs ;
|
flags optimize=all_subs ;
|
||||||
|
|
||||||
@@ -69,7 +69,7 @@ concrete CatEng of Cat = open ResEng, Prelude in {
|
|||||||
Subj = {s : Str} ;
|
Subj = {s : Str} ;
|
||||||
Prep = {s : Str} ;
|
Prep = {s : Str} ;
|
||||||
|
|
||||||
-- Open lexical classes, e.g. Basic
|
-- Open lexical classes, e.g. Lexicon
|
||||||
|
|
||||||
V, VS, VQ, VA = Verb ; -- = {s : VForm => Str} ;
|
V, VS, VQ, VA = Verb ; -- = {s : VForm => Str} ;
|
||||||
V2, VV, V2A = Verb ** {c2 : Str} ;
|
V2, VV, V2A = Verb ** {c2 : Str} ;
|
||||||
|
|||||||
@@ -11,9 +11,8 @@ concrete LangEng of Lang =
|
|||||||
RelativeEng,
|
RelativeEng,
|
||||||
ConjunctionEng,
|
ConjunctionEng,
|
||||||
PhraseEng,
|
PhraseEng,
|
||||||
TensedEng,
|
|
||||||
StructuralEng,
|
StructuralEng,
|
||||||
BasicEng
|
LexiconEng
|
||||||
** {
|
** {
|
||||||
|
|
||||||
flags startcat = Phr ;
|
flags startcat = Phr ;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
--# -path=.:prelude
|
--# -path=.:prelude
|
||||||
|
|
||||||
concrete BasicEng of Basic = CatEng ** open ParadigmsEng in {
|
concrete LexiconEng of Lexicon = CatEng ** open ParadigmsEng in {
|
||||||
|
|
||||||
flags
|
flags
|
||||||
optimize=values ;
|
optimize=values ;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
concrete PhraseEng of Phrase = CatEng, TenseX ** open ResEng in {
|
concrete PhraseEng of Phrase = CatEng ** open ResEng in {
|
||||||
|
|
||||||
lin
|
lin
|
||||||
PhrUtt pconj utt voc = {s = pconj.s ++ utt.s ++ voc.s} ;
|
PhrUtt pconj utt voc = {s = pconj.s ++ utt.s ++ voc.s} ;
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ concrete SentenceEng of Sentence = CatEng ** open ResEng in {
|
|||||||
flags optimize=all_subs ;
|
flags optimize=all_subs ;
|
||||||
|
|
||||||
lin
|
lin
|
||||||
|
|
||||||
PredVP np vp = mkClause (np.s ! Nom) np.a vp ;
|
PredVP np vp = mkClause (np.s ! Nom) np.a vp ;
|
||||||
|
|
||||||
PredSCVP sc vp = mkClause sc.s (agrP3 Sg) vp ;
|
PredSCVP sc vp = mkClause sc.s (agrP3 Sg) vp ;
|
||||||
@@ -38,4 +39,8 @@ concrete SentenceEng of Sentence = CatEng ** open ResEng in {
|
|||||||
EmbedQS qs = {s = qs.s ! QIndir} ;
|
EmbedQS qs = {s = qs.s ! QIndir} ;
|
||||||
EmbedVP vp = {s = "to" ++ infVP vp (agrP3 Sg)} ; --- agr
|
EmbedVP vp = {s = "to" ++ infVP vp (agrP3 Sg)} ; --- agr
|
||||||
|
|
||||||
|
UseCl t a p cl = {s = t.s ++ a.s ++ p.s ++ cl.s ! t.t ! a.a ! p.p ! ODir} ;
|
||||||
|
UseQCl t a p cl = {s = \\q => t.s ++ a.s ++ p.s ++ cl.s ! t.t ! a.a ! p.p ! q} ;
|
||||||
|
UseRCl t a p cl = {s = \\r => t.s ++ a.s ++ p.s ++ cl.s ! t.t ! a.a ! p.p ! r} ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
--# -path=.:../romance:../abstract:../common:prelude
|
--# -path=.:../romance:../abstract:../common:prelude
|
||||||
|
|
||||||
concrete CatFre of Cat = CatRomance with
|
concrete CatFre of Cat = TenseX ** CatRomance with
|
||||||
(ResRomance = ResFre) ;
|
(ResRomance = ResFre) ;
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
-- Translated to GF by Aarne Ranta
|
-- Translated to GF by Aarne Ranta
|
||||||
-- added extracted subcat information 29/11
|
-- added extracted subcat information 29/11
|
||||||
|
|
||||||
concrete VerbsFre of VerbsFreAbs = CatFre **
|
concrete IrregFre of IrregFreAbs = CatFre **
|
||||||
open DiffFre, MorphoFre, BeschFre, Prelude in {
|
open DiffFre, MorphoFre, BeschFre, Prelude in {
|
||||||
|
|
||||||
flags optimize=values ;
|
flags optimize=values ;
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
-- Translated to GF by Aarne Ranta
|
-- Translated to GF by Aarne Ranta
|
||||||
-- added extracted subcat information 29/11
|
-- added extracted subcat information 29/11
|
||||||
|
|
||||||
abstract VerbsFreAbs = Cat ** {
|
abstract IrregFreAbs = Cat ** {
|
||||||
|
|
||||||
-- all verbs in classes with "er" and "ir" like "finir" are omitted
|
-- all verbs in classes with "er" and "ir" like "finir" are omitted
|
||||||
|
|
||||||
@@ -11,9 +11,8 @@ concrete LangFre of Lang =
|
|||||||
RelativeFre,
|
RelativeFre,
|
||||||
ConjunctionFre,
|
ConjunctionFre,
|
||||||
PhraseFre,
|
PhraseFre,
|
||||||
TensedFre,
|
|
||||||
StructuralFre,
|
StructuralFre,
|
||||||
BasicFre
|
LexiconFre
|
||||||
** {
|
** {
|
||||||
|
|
||||||
flags startcat = Phr ;
|
flags startcat = Phr ;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
--# -path=.:../romance:../common:../abstract:../../prelude
|
--# -path=.:../romance:../common:../abstract:../../prelude
|
||||||
|
|
||||||
concrete BasicFre of Basic = CatFre ** open ParadigmsFre, VerbsFre in {
|
concrete LexiconFre of Lexicon = CatFre ** open ParadigmsFre, IrregFre in {
|
||||||
|
|
||||||
flags
|
flags
|
||||||
optimize=values ;
|
optimize=values ;
|
||||||
@@ -1,2 +1,2 @@
|
|||||||
concrete PhraseFre of Phrase = CatFre, TenseX ** PhraseRomance with
|
concrete PhraseFre of Phrase = CatFre ** PhraseRomance with
|
||||||
(ResRomance = ResFre) ;
|
(ResRomance = ResFre) ;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
concrete StructuralFre of Structural = CatFre **
|
concrete StructuralFre of Structural = CatFre **
|
||||||
open PhonoFre, MorphoFre, ParadigmsFre, VerbsFre, Prelude in {
|
open PhonoFre, MorphoFre, ParadigmsFre, IrregFre, Prelude in {
|
||||||
|
|
||||||
flags optimize=all ;
|
flags optimize=all ;
|
||||||
|
|
||||||
|
|||||||
@@ -1,2 +0,0 @@
|
|||||||
concrete TensedFre of Tensed = CatFre, TenseX ** TensedRomance with
|
|
||||||
(ResRomance = ResFre) ;
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
concrete CatGer of Cat = open ResGer, Prelude in {
|
concrete CatGer of Cat = TenseX ** open ResGer, Prelude in {
|
||||||
|
|
||||||
flags optimize=all_subs ;
|
flags optimize=all_subs ;
|
||||||
|
|
||||||
@@ -71,7 +71,7 @@ concrete CatGer of Cat = open ResGer, Prelude in {
|
|||||||
Subj = {s : Str} ;
|
Subj = {s : Str} ;
|
||||||
Prep = {s : Str ; c : Case} ;
|
Prep = {s : Str ; c : Case} ;
|
||||||
|
|
||||||
-- Open lexical classes, e.g. Basic
|
-- Open lexical classes, e.g. Lexicon
|
||||||
|
|
||||||
V, VS, VQ, VA = ResGer.Verb ; -- = {s : VForm => Str} ;
|
V, VS, VQ, VA = ResGer.Verb ; -- = {s : VForm => Str} ;
|
||||||
VV = Verb ** {isAux : Bool} ;
|
VV = Verb ** {isAux : Bool} ;
|
||||||
|
|||||||
@@ -11,9 +11,8 @@ concrete LangGer of Lang =
|
|||||||
RelativeGer,
|
RelativeGer,
|
||||||
ConjunctionGer,
|
ConjunctionGer,
|
||||||
PhraseGer,
|
PhraseGer,
|
||||||
TensedGer,
|
|
||||||
StructuralGer,
|
StructuralGer,
|
||||||
BasicGer
|
LexiconGer
|
||||||
** {
|
** {
|
||||||
|
|
||||||
flags startcat = Phr ;
|
flags startcat = Phr ;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
--# -path=.:../common:../abstract:../../prelude
|
--# -path=.:../common:../abstract:../../prelude
|
||||||
|
|
||||||
concrete BasicGer of Basic = CatGer ** open Prelude, ParadigmsGer in {
|
concrete LexiconGer of Lexicon = CatGer ** open Prelude, ParadigmsGer in {
|
||||||
|
|
||||||
flags
|
flags
|
||||||
optimize=all_subs ;
|
optimize=all_subs ;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
concrete PhraseGer of Phrase = CatGer, TenseX ** open Prelude, ResGer in {
|
concrete PhraseGer of Phrase = CatGer ** open Prelude, ResGer in {
|
||||||
|
|
||||||
flags optimize=all_subs ;
|
flags optimize=all_subs ;
|
||||||
|
|
||||||
|
|||||||
@@ -37,4 +37,8 @@ concrete SentenceGer of Sentence = CatGer ** open ResGer in {
|
|||||||
EmbedQS qs = {s = qs.s ! QIndir} ;
|
EmbedQS qs = {s = qs.s ! QIndir} ;
|
||||||
EmbedVP vp = {s = "zu" ++ (vp.s ! agrP3 Sg ! VPInfinit Simul).inf} ; --- agr ---- compl
|
EmbedVP vp = {s = "zu" ++ (vp.s ! agrP3 Sg ! VPInfinit Simul).inf} ; --- agr ---- compl
|
||||||
|
|
||||||
|
UseCl t a p cl = {s = \\o => t.s ++ a.s ++ p.s ++ cl.s ! t.t ! a.a ! p.p ! o} ;
|
||||||
|
UseQCl t a p cl = {s = \\q => t.s ++ a.s ++ p.s ++ cl.s ! t.t ! a.a ! p.p ! q} ;
|
||||||
|
UseRCl t a p cl = {s = \\r => t.s ++ a.s ++ p.s ++ cl.s ! t.t ! a.a ! p.p ! r} ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,5 +12,5 @@ abstract Multimodal =
|
|||||||
-- Tensed,
|
-- Tensed,
|
||||||
Structural,
|
Structural,
|
||||||
Demonstrative,
|
Demonstrative,
|
||||||
Basic
|
Lexicon
|
||||||
** {} ;
|
** {} ;
|
||||||
|
|||||||
@@ -14,6 +14,6 @@ concrete MultimodalEng of Multimodal =
|
|||||||
-- Tensed,
|
-- Tensed,
|
||||||
StructuralEng,
|
StructuralEng,
|
||||||
DemonstrativeEng,
|
DemonstrativeEng,
|
||||||
BasicEng
|
LexiconEng
|
||||||
** {} ;
|
** {} ;
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,6 @@ concrete MultimodalFre of Multimodal =
|
|||||||
-- Tensed,
|
-- Tensed,
|
||||||
StructuralFre,
|
StructuralFre,
|
||||||
DemonstrativeFre,
|
DemonstrativeFre,
|
||||||
BasicFre
|
LexiconFre
|
||||||
** {} ;
|
** {} ;
|
||||||
|
|
||||||
|
|||||||
@@ -14,5 +14,5 @@ concrete MultimodalGer of Multimodal =
|
|||||||
-- Tensed,
|
-- Tensed,
|
||||||
StructuralGer,
|
StructuralGer,
|
||||||
DemonstrativeGer,
|
DemonstrativeGer,
|
||||||
BasicGer
|
LexiconGer
|
||||||
** {} ;
|
** {} ;
|
||||||
|
|||||||
@@ -14,6 +14,6 @@ concrete MultimodalSwe of Multimodal =
|
|||||||
-- Tensed,
|
-- Tensed,
|
||||||
StructuralSwe,
|
StructuralSwe,
|
||||||
DemonstrativeSwe,
|
DemonstrativeSwe,
|
||||||
BasicSwe
|
LexiconSwe
|
||||||
** {} ;
|
** {} ;
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
-- This lexicon is used when developing a grammar, and called by
|
-- This lexicon is used when developing a grammar, and called by
|
||||||
-- [Test Test.html]. The full lexicon is divided between
|
-- [Test Test.html]. The full lexicon is divided between
|
||||||
-- [Structural Structural.html], [Basic Basic.html], and [Numeral Numeral.html].
|
-- [Structural Structural.html], [Lexicon Lexicon.html], and [Numeral Numeral.html].
|
||||||
|
|
||||||
abstract Lex = Cat ** {
|
abstract Lex = Cat ** {
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
-- A variant with just the polarity variation is given in
|
-- A variant with just the polarity variation is given in
|
||||||
-- [Untensed Untensed.html].
|
-- [Untensed Untensed.html].
|
||||||
|
|
||||||
abstract Tensed = Cat, Tense ** {
|
abstract Tensed = Cat ** {
|
||||||
|
|
||||||
fun
|
fun
|
||||||
UseCl : Tense -> Ant -> Pol -> Cl -> S ;
|
UseCl : Tense -> Ant -> Pol -> Cl -> S ;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
concrete TensedEng of Tensed = CatEng, TenseX ** open ResEng in {
|
concrete TensedEng of Tensed = CatEng ** open ResEng in {
|
||||||
|
|
||||||
flags optimize=all_subs ;
|
flags optimize=all_subs ;
|
||||||
|
|
||||||
2
lib/resource-1.0/old/TensedFre.gf
Normal file
2
lib/resource-1.0/old/TensedFre.gf
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
concrete TensedFre of Tensed = CatFre ** TensedRomance with
|
||||||
|
(ResRomance = ResFre) ;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
incomplete concrete TensedRomance of Tensed = CatRomance, TenseX **
|
incomplete concrete TensedRomance of Tensed = CatRomance **
|
||||||
open ResRomance in {
|
open ResRomance in {
|
||||||
|
|
||||||
flags optimize=all_subs ;
|
flags optimize=all_subs ;
|
||||||
@@ -20,7 +20,7 @@ abstract Test =
|
|||||||
Untensed,
|
Untensed,
|
||||||
-- Tensed,
|
-- Tensed,
|
||||||
-- Structural,
|
-- Structural,
|
||||||
-- Basic,
|
-- Lexicon,
|
||||||
-- Numeral,
|
-- Numeral,
|
||||||
Lex
|
Lex
|
||||||
** {} ;
|
** {} ;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
incomplete concrete CatRomance of Cat =
|
incomplete concrete CatRomance of Cat =
|
||||||
open Prelude, CommonRomance, ResRomance, (R = ParamX) in {
|
TenseX ** open Prelude, CommonRomance, ResRomance, (R = ParamX) in {
|
||||||
|
|
||||||
flags optimize=all_subs ;
|
flags optimize=all_subs ;
|
||||||
|
|
||||||
@@ -71,7 +71,7 @@ incomplete concrete CatRomance of Cat =
|
|||||||
Subj = {s : Str ; m : Mood} ;
|
Subj = {s : Str ; m : Mood} ;
|
||||||
Prep = {s : Str ; c : Case} ;
|
Prep = {s : Str ; c : Case} ;
|
||||||
|
|
||||||
-- Open lexical classes, e.g. Basic
|
-- Open lexical classes, e.g. Lexicon
|
||||||
|
|
||||||
V, VQ, VA = Verb ;
|
V, VQ, VA = Verb ;
|
||||||
V2, VV, V2A = Verb ** {c2 : Compl} ;
|
V2, VV, V2A = Verb ** {c2 : Compl} ;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
incomplete concrete PhraseRomance of Phrase =
|
incomplete concrete PhraseRomance of Phrase =
|
||||||
CatRomance, TenseX ** open CommonRomance, ResRomance, Prelude in {
|
CatRomance ** open CommonRomance, ResRomance, Prelude in {
|
||||||
|
|
||||||
lin
|
lin
|
||||||
PhrUtt pconj utt voc = {s = pconj.s ++ utt.s ++ voc.s} ;
|
PhrUtt pconj utt voc = {s = pconj.s ++ utt.s ++ voc.s} ;
|
||||||
|
|||||||
@@ -40,4 +40,9 @@ incomplete concrete SentenceRomance of Sentence =
|
|||||||
EmbedQS qs = {s = qs.s ! QIndir} ;
|
EmbedQS qs = {s = qs.s ! QIndir} ;
|
||||||
EmbedVP vp = {s = infVP vp (agrP3 Masc Sg)} ; --- agr ---- compl
|
EmbedVP vp = {s = infVP vp (agrP3 Masc Sg)} ; --- agr ---- compl
|
||||||
|
|
||||||
|
UseCl t a p cl = {s = \\o => t.s ++ a.s ++ p.s ++ cl.s ! t.t ! a.a ! p.p ! o} ;
|
||||||
|
UseQCl t a p cl = {s = \\q => t.s ++ a.s ++ p.s ++ cl.s ! t.t ! a.a ! p.p ! q} ;
|
||||||
|
UseRCl t a p cl =
|
||||||
|
{s = \\r,ag => t.s ++ a.s ++ p.s ++ cl.s ! t.t ! a.a ! p.p ! r ! ag} ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
incomplete concrete CatScand of Cat =
|
incomplete concrete CatScand of Cat =
|
||||||
open ResScand, Prelude, CommonScand, (R = ParamX) in {
|
TenseX ** open ResScand, Prelude, CommonScand, (R = ParamX) in {
|
||||||
|
|
||||||
flags optimize=all_subs ;
|
flags optimize=all_subs ;
|
||||||
|
|
||||||
@@ -87,7 +87,7 @@ incomplete concrete CatScand of Cat =
|
|||||||
Subj = {s : Str} ;
|
Subj = {s : Str} ;
|
||||||
Prep = {s : Str} ;
|
Prep = {s : Str} ;
|
||||||
|
|
||||||
-- Open lexical classes, e.g. Basic
|
-- Open lexical classes, e.g. Lexicon
|
||||||
|
|
||||||
V, VS, VQ, VA = Verb ;
|
V, VS, VQ, VA = Verb ;
|
||||||
V2, VV, V2A = Verb ** {c2 : Str} ;
|
V2, VV, V2A = Verb ** {c2 : Str} ;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
incomplete concrete PhraseScand of Phrase =
|
incomplete concrete PhraseScand of Phrase =
|
||||||
CatScand, TenseX ** open CommonScand, ResScand, Prelude in {
|
CatScand ** open CommonScand, ResScand, Prelude in {
|
||||||
|
|
||||||
lin
|
lin
|
||||||
PhrUtt pconj utt voc = {s = pconj.s ++ utt.s ++ voc.s} ;
|
PhrUtt pconj utt voc = {s = pconj.s ++ utt.s ++ voc.s} ;
|
||||||
|
|||||||
@@ -40,4 +40,8 @@ incomplete concrete SentenceScand of Sentence =
|
|||||||
EmbedQS qs = {s = qs.s ! QIndir} ;
|
EmbedQS qs = {s = qs.s ! QIndir} ;
|
||||||
EmbedVP vp = {s = infMark ++ infVP vp (agrP3 utrum Sg)} ; --- agr
|
EmbedVP vp = {s = infMark ++ infVP vp (agrP3 utrum Sg)} ; --- agr
|
||||||
|
|
||||||
|
UseCl t a p cl = {s = \\o => t.s ++ a.s ++ p.s ++ cl.s ! t.t ! a.a ! p.p ! o} ;
|
||||||
|
UseQCl t a p cl = {s = \\q => t.s ++ a.s ++ p.s ++ cl.s ! t.t ! a.a ! p.p ! q} ;
|
||||||
|
UseRCl t a p cl = {s = \\r => t.s ++ a.s ++ p.s ++ cl.s ! t.t ! a.a ! p.p ! r} ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
concrete CatSwe of Cat = CatScand with
|
concrete CatSwe of Cat = TenseX ** CatScand with
|
||||||
(ResScand = ResSwe) ;
|
(ResScand = ResSwe) ;
|
||||||
|
|||||||
@@ -11,9 +11,8 @@ concrete LangSwe of Lang =
|
|||||||
RelativeSwe,
|
RelativeSwe,
|
||||||
ConjunctionSwe,
|
ConjunctionSwe,
|
||||||
PhraseSwe,
|
PhraseSwe,
|
||||||
TensedSwe,
|
|
||||||
StructuralSwe,
|
StructuralSwe,
|
||||||
BasicSwe
|
LexiconSwe
|
||||||
** {
|
** {
|
||||||
|
|
||||||
flags startcat = Phr ;
|
flags startcat = Phr ;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
--# -path=.:../scandinavian:../common:../abstract:../../prelude
|
--# -path=.:../scandinavian:../common:../abstract:../../prelude
|
||||||
|
|
||||||
concrete BasicSwe of Basic = CatSwe ** open ParadigmsSwe in {
|
concrete LexiconSwe of Lexicon = CatSwe ** open ParadigmsSwe in {
|
||||||
|
|
||||||
flags
|
flags
|
||||||
optimize=values ;
|
optimize=values ;
|
||||||
@@ -1,2 +1,2 @@
|
|||||||
concrete PhraseSwe of Phrase = CatSwe, TenseX ** PhraseScand with
|
concrete PhraseSwe of Phrase = CatSwe ** PhraseScand with
|
||||||
(ResScand = ResSwe) ;
|
(ResScand = ResSwe) ;
|
||||||
|
|||||||
Reference in New Issue
Block a user