mirror of
https://github.com/GrammaticalFramework/comp-syntax-gu-mlt.git
synced 2026-02-08 22:41:05 -07:00
change minitranslator to use MicroLang
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
microlang:
|
||||
gf -make ../lab2/grammar/english/MicroLangEng.gf ../lab2/grammar/functor/MicroLangFunctorSwe.gf
|
||||
|
||||
minilang:
|
||||
gf -make ../lab2/grammar/english/MiniLangEng.gf ../lab2/grammar/swedish/MiniLangSwe.gf
|
||||
gf -make ../lab2/grammar/english/MiniLangEng.gf ../lab2/grammar/functor/MiniLangFunctorSwe.gf
|
||||
|
||||
query:
|
||||
gf -make QueryEng.gf QuerySwe.gf
|
||||
|
||||
@@ -30,7 +30,7 @@ A minimal translator can be found in
|
||||
|
||||
[`minitranslator.py`](./minitranslator.py)
|
||||
|
||||
This program reads one line of input and translates it from English to Swedish by using `MiniGrammar.pgf`. Example:
|
||||
This program reads one line of input and translates it from English to Swedish by using `MicroGrammar.pgf`. Example:
|
||||
```
|
||||
$ echo "the cat is black" | python3 minitranslator.py
|
||||
katten är svart
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
import pgf
|
||||
|
||||
# change these three to translate with other grammars and languages
|
||||
absmodule = "MiniLang"
|
||||
absmodule = "MicroLang"
|
||||
fromname = absmodule + "Eng"
|
||||
toname = absmodule + "Swe"
|
||||
toname = absmodule + "FunctorSwe"
|
||||
|
||||
def main():
|
||||
# read in the grammar, set up to and from languages
|
||||
|
||||
Reference in New Issue
Block a user