CLT slides complete (but not finished...)

This commit is contained in:
aarne
2006-03-08 08:38:22 +00:00
parent 8019e4e977
commit 863454b94d
2 changed files with 178 additions and 11 deletions

View File

@@ -7,7 +7,7 @@
<P ALIGN="center"><CENTER><H1>The GF Resource Grammar Library Version 1.0</H1>
<FONT SIZE="4">
<I>Author: Aarne Ranta &lt;aarne (at) cs.chalmers.se&gt;</I><BR>
Last update: Wed Mar 8 08:31:08 2006
Last update: Wed Mar 8 09:34:17 2006
</FONT></CENTER>
<P>
@@ -770,27 +770,121 @@ Example: <A HREF="../../../examples/animal/QuestionsI.gfe">animal</A>
<!-- NEW -->
</P>
<H2>How to implement a new language</H2>
<H3>Ordinary modules</H3>
<P>
See <A HREF="Resource-HOWTO.html">Resource-HOWTO</A>
</P>
<H2>Ordinary modules</H2>
<P>
Write a concrete syntax module for each abstract module in the API
</P>
<P>
Write a <CODE>Paradigms</CODE> module
</P>
<P>
Examples: English, Finnish, German, Russian
</P>
<P>
<!-- NEW -->
</P>
<H3>Parametrized modules</H3>
<H2>Parametrized modules</H2>
<P>
Examples: Romance (French, Italian, Spanish), Scandinavian (Danish, Norwegian, Swedish)
</P>
<P>
Write a <CODE>Diff</CODE> interface for a family of languages
</P>
<P>
Write concrete syntaxes as functors opening the interface
</P>
<P>
Write separate <CODE>Paradigms</CODE> modules for each language
</P>
<P>
Advantages:
</P>
<UL>
<LI>easier maintenance of library
<LI>insights into language families
</UL>
<P>
Problems:
</P>
<UL>
<LI>more abstract thinking required
<LI>individual grammars may not come out optimal in elegance and efficiency
</UL>
<P>
<!-- NEW -->
</P>
<H3>The kernel of the API</H3>
<H3>The core of the API</H3>
<P>
Everything else is variations of this
</P>
<PRE>
cat
Cl ; -- clause
VP ; -- verb phrase
V2 ; -- two-place verb
NP ; -- noun phrase
CN ; -- common noun
Det ; -- determiner
AP ; -- adjectival phrase
fun
PredVP : NP -&gt; VP -&gt; Cl ; -- predication
ComplV2 : V2 -&gt; NP -&gt; VP ; -- complementization
DetCN : Det -&gt; CN -&gt; NP ; -- determination
ModCN : AP -&gt; CN -&gt; CN ; -- modification
</PRE>
<P></P>
<P>
<!-- NEW -->
</P>
<H3>The core of the API</H3>
<P>
This <A HREF="latin.gf">toy Latin grammar</A> shows in a nutshell how the core
can be implemented.
</P>
<P>
Use this API as a first approximation when designing the parameter system of a new
language.
</P>
<P>
<!-- NEW -->
</P>
<H3>How to proceed</H3>
<OL>
<LI>put up a directory with dummy modules by copying from e.g. English and
commenting out the contents
<P></P>
<LI>so you will have a compilable <CODE>LangX</CODE> all the time
<P></P>
<LI>start with nouns and their inflection
<P></P>
<LI>proceed to verbs and their inflection
<P></P>
<LI>add some noun phrases
<P></P>
<LI>implement predication
</OL>
<P>
<!-- NEW -->
</P>
<H2>How to extend the API</H2>
<P>
<!-- NEW -->
Extend old modules or add a new one?
</P>
<P>
Usually better to start a new one: then you don't have to implement it
for all languages at once.
</P>
<P>
Exception: if you are working with a language-specific API extension,
you can work directly in that module.
</P>
<H3>Extend old modules or add a new one?</H3>
<!-- html code generated by txt2tags 2.3 (http://txt2tags.sf.net) -->
<!-- cmdline: txt2tags clt2006.txt -->