diff --git a/doc/gf-history.html b/doc/gf-history.html index 1ff6b5cab..1e5555c11 100644 --- a/doc/gf-history.html +++ b/doc/gf-history.html @@ -20,8 +20,8 @@ converted to .gf files by the command
gf -makeconcrete File.gfe-See -../lib/resource/doc/examples/QuestionsExI.gfe +See +../lib/resource/doc/examples/QuestionsI.gfe for an example.
diff --git a/index.html b/index.html index dce5b4f1b..28b23a429 100644 --- a/index.html +++ b/index.html @@ -20,6 +20,12 @@ May 17, 2005.
+ May 17, 2005. Version 2.2 released. See highlights. Download from diff --git a/lib/resource/doc/example/HandQuestionsI.gf b/lib/resource/doc/example/HandQuestionsI.gf new file mode 100644 index 000000000..9915cc8d5 --- /dev/null +++ b/lib/resource/doc/example/HandQuestionsI.gf @@ -0,0 +1,20 @@ +--# -path=.:resource/abstract:resource/../prelude + +-- Language-independent question grammar parametrized on Resource. + +incomplete concrete QuestionsI of Questions = open Resource in { + lincat + Phrase = Phr ; + Entity = N ; + Action = V2 ; + lin + Who act obj = + QuestPhrase (UseQCl (PosTP TPresent ASimul) + (QPredV2 who8one_IP act (IndefNumNP NoNum (UseN obj)))) ; + Whom subj act = + QuestPhrase (UseQCl (PosTP TPresent ASimul) + (IntSlash who8one_IP (SlashV2 (DefOneNP (UseN subj)) act))) ; + Answer subj act obj = + IndicPhrase (UseCl (PosTP TPresent ASimul) + (SPredV2 (DefOneNP (UseN subj)) act (IndefNumNP NoNum (UseN obj)))) ; +} diff --git a/lib/resource/doc/example/QuestionsEng.gf b/lib/resource/doc/example/QuestionsEng.gf index 2a0bb12ff..62234bfec 100644 --- a/lib/resource/doc/example/QuestionsEng.gf +++ b/lib/resource/doc/example/QuestionsEng.gf @@ -1,2 +1,2 @@ -concrete QuestionsEng of Questions = QuestionsExI with +concrete QuestionsEng of Questions = QuestionsI with (Resource = ResourceEng) ; diff --git a/lib/resource/doc/example/QuestionsExI.gfe b/lib/resource/doc/example/QuestionsExI.gfe deleted file mode 100644 index adb54a900..000000000 --- a/lib/resource/doc/example/QuestionsExI.gfe +++ /dev/null @@ -1,15 +0,0 @@ ---# -resource=../../langeng.gfcm - --- to compile: gf -makeconcrete QuestionsExI.gfe - -incomplete concrete QuestionsExI of Questions = open Resource in { - lincat - Phrase = Phr ; - Entity = N ; - Action = V2 ; - - lin Who love_V2 man_N = in Phr "who loves the men?" ; - lin Whom man_N love_V2 = in Phr "whom does the man love?" ; - lin Answer woman_N love_V2 man_N = in Phr "the woman loves the man." ; - -} diff --git a/lib/resource/doc/example/QuestionsI.gf b/lib/resource/doc/example/QuestionsI.gf index 9915cc8d5..18174443f 100644 --- a/lib/resource/doc/example/QuestionsI.gf +++ b/lib/resource/doc/example/QuestionsI.gf @@ -1,20 +1,15 @@ ---# -path=.:resource/abstract:resource/../prelude +--# -resource=../../english/LangEng.gf --- Language-independent question grammar parametrized on Resource. +-- to compile: gf -makeconcrete QuestionsI.gfe incomplete concrete QuestionsI of Questions = open Resource in { lincat Phrase = Phr ; Entity = N ; Action = V2 ; - lin - Who act obj = - QuestPhrase (UseQCl (PosTP TPresent ASimul) - (QPredV2 who8one_IP act (IndefNumNP NoNum (UseN obj)))) ; - Whom subj act = - QuestPhrase (UseQCl (PosTP TPresent ASimul) - (IntSlash who8one_IP (SlashV2 (DefOneNP (UseN subj)) act))) ; - Answer subj act obj = - IndicPhrase (UseCl (PosTP TPresent ASimul) - (SPredV2 (DefOneNP (UseN subj)) act (IndefNumNP NoNum (UseN obj)))) ; + + lin Who love_V2 man_N = QuestPhrase (UseQCl (PosTP TPresent ASimul) (QPredV2 who8one_IP love_V2 (IndefNumNP NoNum (UseN man_N)))) ; + lin Whom man_N love_V2 = QuestPhrase (UseQCl (PosTP TPresent ASimul) (IntSlash who8many_IP (SlashV2 (DefOneNP (UseN man_N)) love_V2))) ; -- AMBIGUOUS + lin Answer woman_N love_V2 man_N = IndicPhrase (UseCl (PosTP TPresent ASimul) (SPredV2 (DefOneNP (UseN woman_N)) love_V2 (IndefNumNP NoNum (UseN man_N)))) ; + } diff --git a/lib/resource/doc/gf-resource.html b/lib/resource/doc/gf-resource.html index a11628544..580d424f8 100644 --- a/lib/resource/doc/gf-resource.html +++ b/lib/resource/doc/gf-resource.html @@ -640,7 +640,7 @@ We build the abstract syntax in two phases: The concrete syntax of English is built in three phases:
+ +You can use the resource grammar as a parser on a special file format, +.gfe ("GF examples"). Here is the new source, +QuestionsI.gfe, which +generates +QuestionsI.gf, +when you execute the command +
+ gf -makeconcrete QuestionsI.gfe ++Of course, the grammar of any language can be created by +parsing any language, as long as they have a common resource API. +The use of English resource is generally recommended, because it +is smaller and faster to parse than the other languages. +