AnimalsFre now works

This commit is contained in:
aarne
2005-02-20 07:57:47 +00:00
parent 95adb717e2
commit 6dc5c19c9e
5 changed files with 53 additions and 13 deletions

View File

@@ -0,0 +1,28 @@
digraph {
Verbphrase [style = "solid", shape = "ellipse", URL = "Verbphrase.gf"];
Clause -> Categories [style = "solid"];
Resource [style = "solid", shape = "ellipse", URL = "Resource.gf"];
Resource -> Rules [style = "solid"];
Resource -> Clause [style = "solid"];
Resource -> Structural [style = "solid"];
Clause [style = "solid", shape = "ellipse", URL = "Clause.gf"];
Clause -> Categories [style = "solid"];
Rules [style = "solid", shape = "ellipse", URL = "Rules.gf"];
Rules -> Categories [style = "solid"];
Structural [style = "solid", shape = "ellipse", URL = "Structural.gf"];
Structural -> Categories [style = "solid"];
Structural -> Numerals [style = "solid"];
Categories [style = "solid", shape = "ellipse", URL = "Categories.gf"];
Categories -> PredefAbs [style = "solid"];
PredefAbs [style = "solid", shape = "ellipse", URL = "PredefAbs.gf"];
Numerals [style = "solid", shape = "ellipse", URL = "Numerals.gf"];
}

View File

@@ -11,11 +11,11 @@ concrete AnimalsFre of Animals =
Action = V2 ; Action = V2 ;
lin lin
Who act obj = QuestPhrase (UseQCl (PosTP TPresent ASimul) Who act obj = QuestPhrase (UseQCl (PosTP TPresent ASimul)
(IntVP who8one_IP (ComplV2 act (IndefNumNP NoNum (UseN obj))))) ; (IntVP who8one_IP (ComplV2 act (DefNumNP NoNum (UseN obj))))) ;
Whom subj act = QuestPhrase (UseQCl (PosTP TPresent ASimul) Whom subj act = QuestPhrase (UseQCl (PosTP TPresent ASimul)
(IntSlash who8one_IP (SlashV2 (DefOneNP (UseN subj)) act))) ; (IntSlash who8one_IP (SlashV2 (DefOneNP (UseN subj)) act))) ;
Answer subj act obj = IndicPhrase (UseCl (PosTP TPresent ASimul) Answer subj act obj = IndicPhrase (UseCl (PosTP TPresent ASimul)
(PredVP (DefOneNP (UseN subj)) (ComplV2 act (IndefNumNP NoNum (UseN obj))))) ; (PredVP (DefOneNP (UseN subj)) (ComplV2 act (DefNumNP NoNum (UseN obj))))) ;
Dog = regN "chien" masculine ; Dog = regN "chien" masculine ;
Cat = regN "chat" masculine ; Cat = regN "chat" masculine ;
Mouse = regN "souris" feminine ; Mouse = regN "souris" feminine ;

View File

@@ -0,0 +1,4 @@
i -src AnimalsEng.gf ;; s
i -src AnimalsFre.gf ;; s
i -src AnimalsSwe.gf ;; s
pm | wf animals.gfcm

View File

@@ -484,7 +484,7 @@ Source modules:
<p> <p>
<a href=example/AnimalsFre.gf>AnimalsFre</a> (does not compile yet) <a href=example/AnimalsFre.gf>AnimalsFre</a>
<p> <p>
@@ -496,27 +496,30 @@ Source modules:
The resources are bulky, and it takes a therefore a lot of The resources are bulky, and it takes a therefore a lot of
time and memory to load the grammars. However, they can be time and memory to load the grammars. However, they can be
comiled into the <tt>gfcm</tt> compiled into the <tt>gfcm</tt>
(<b>GF canonical multilingual</b>) format, (<b>GF canonical multilingual</b>) format,
which is almost one thousand times smaller and faster to load. which is almost one thousand times smaller and faster to load
for this set of grammars.
<p> <p>
Just issue the following GF commands Just issue the following GF commands
<pre> <pre>
i AnimalsEng.gf i -src AnimalsEng.gf ;; s
-- i AnimalsFre.gf -- does not compile yet i -src AnimalsFre.gf ;; s
i AnimalsSwe.gf i -src AnimalsSwe.gf ;; s
pm | wf animals.gfcm pm | wf animals.gfcm
</pre> </pre>
and you get a grammar this end-user grammar. and you get an end-user grammar <tt>animals.gfcm</tt>.
<p> <p>
You can also write the commands in a <tt>gfs</tt> (<b>GF script</b>) You can also write the commands in a <tt>gfs</tt> (<b>GF script</b>)
file, say <tt>mkAnimals.gfs</tt>, and then call GF with file, say
<a href=mkAnimals.gfc><tt>mkAnimals.gfs</tt></a>,
and then call GF with
<pre> <pre>
gf <mkAnimals.gfs gf &lt;mkAnimals.gfs
</pre> </pre>
@@ -529,7 +532,10 @@ Step 1: use a simplified access to present-tense sentences,
<p> <p>
Step 2: factor out the categories and purely combinational Step 2: factor out the categories and purely combinational
rules into an <tt>incomplete</ii> module (to be shown...) rules into an <tt>incomplete</tt> module (to be shown... but
this does not work for French, which uses different structures:
e.g. <i>Qui aime les lions ?</i> with a definite phrase
where English has <i>Who loves lions?</i>
<!-- NEW --> <!-- NEW -->

View File

@@ -1071,10 +1071,12 @@ oper
-- N.B. inversion variants and "est-ce que" are treated as above. -- N.B. inversion variants and "est-ce que" are treated as above.
intVerbPhrase : IntPron -> VerbGroup -> Question = \ip,vg -> intVerbPhrase : IntPron -> VerbGroup -> Question = \ip,vg ->
questClause (predVerbGroupClause (ip ** {p = P3 ; c = Clit0}) vg) ; questClause (predVerbGroupClause (intNounPhrase ip) vg) ;
intSlash : IntPron -> ClauseSlashNounPhrase -> Question ; intSlash : IntPron -> ClauseSlashNounPhrase -> Question ;
intNounPhrase : IntPron -> NounPhrase = \ip ->
{s = \\nf => ip.s ! pform2case nf ; g = PGen ip.g ; n = ip.n ; p = P3 ; c = Clit0} ;
--3 Interrogative adverbials --3 Interrogative adverbials
-- --