1
0
forked from GitHub/gf-core

Karin C's example

This commit is contained in:
aarne
2004-09-16 14:47:18 +00:00
parent d5c0814180
commit e2f00638e2
55 changed files with 2212 additions and 4 deletions

53
grammars/video/README Normal file
View File

@@ -0,0 +1,53 @@
Video dialogue grammars by Karin Cavallin.
Reconstructed in GF 2 with multiple inheritance. AR 16/9/2004
Example usage (test Swedish generation and parsing, and Prolog
generation)
> i allSwe.gf
> i allProlog.gf
> gr -cat=DMove | l -tr -lang=allSwe | p -cat=DMove -lang=allSwe | l -lang=allProlog
vill du använda svenska eller engelska
ask ([language (X)])
The intended use of that grammar is in dialogue systems to program a
video recorder. Queries in Swedish are translated to Prolog.
The original grammar is written in GF 1.2 and includes. There is a
very nice modular structure, which could not be reproduced with the
single inheritance straightjacket of GF 2.0. But now we can finally
do this again!
Map of abstract syntax inheritances.
all
/ \
/ \
specUser specSystem
/ \ / \
genUser specific genSystem
| / | | \ |
| / | | \ |
| / channel time weekday |
| | |
| | |
-----general ------------------
The map was obtained by:
grep abstract *.gf */*.gf
all.gf:abstract all = specUser,specSystem ** {
Channel/channel.gf:abstract channel = {
Shared/general.gf:abstract general = {
Shared/specific.gf:abstract specific = general, weekday, time, channel ** {
System/genSystem.gf:abstract genSystem = general ** {
System/specSystem.gf:abstract specSystem = specific, genSystem ** {
Time/time.gf:abstract time = {
User/genUser.gf:abstract genUser = general ** {
User/specUser.gf:abstract specUser = specific, genUser ** {
Weekday/weekday.gf:abstract weekday = {