diff options
| author | aarne <aarne@chalmers.se> | 2010-12-23 10:05:27 +0000 |
|---|---|---|
| committer | aarne <aarne@chalmers.se> | 2010-12-23 10:05:27 +0000 |
| commit | c3071113b3f7e6e0fea351297d3ca11adc407e16 (patch) | |
| tree | 5379a8dbc405ed24bb5ac3ac5345bf225059ee4c /doc | |
| parent | 706f3c89b510fc6dbd2b828d9a660f111d165ded (diff) | |
word alignment ex in tutorial
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/tutorial/align2.png | bin | 0 -> 12903 bytes | |||
| -rw-r--r-- | doc/tutorial/gf-tutorial.html | 19 | ||||
| -rw-r--r-- | doc/tutorial/gf-tutorial.t2t | 18 | ||||
| -rw-r--r-- | doc/tutorial/myparse.png | bin | 0 -> 27852 bytes |
4 files changed, 31 insertions, 6 deletions
diff --git a/doc/tutorial/align2.png b/doc/tutorial/align2.png Binary files differnew file mode 100644 index 000000000..79698dd0f --- /dev/null +++ b/doc/tutorial/align2.png diff --git a/doc/tutorial/gf-tutorial.html b/doc/tutorial/gf-tutorial.html index 3652df3a1..3ca213bdb 100644 --- a/doc/tutorial/gf-tutorial.html +++ b/doc/tutorial/gf-tutorial.html @@ -1119,11 +1119,11 @@ Human eye may prefer to see a visualization: <CODE>visualize_tree = vt</CODE>: </PRE> <P> The tree is generated in postscript (<CODE>.ps</CODE>) file. The <CODE>-view</CODE> option is used for -telling what command to use to view the file. Its default is <CODE>"gv"</CODE>, which works -on most Linux installations. On a Mac, one would probably write +telling what command to use to view the file. Its default is <CODE>"open"</CODE>, which works +on Mac OS X. On Ubuntu Linux, one can write </P> <PRE> - > parse "this delicious cheese is very Italian" | visualize_tree -view="open" + > parse "this delicious cheese is very Italian" | visualize_tree -view="eog" </PRE> <P></P> <P> @@ -1240,6 +1240,19 @@ are put before the noun. This distinction can be controlled by parameters, which are introduced in <a href="#chaptwo">Lesson 3</a>.) </P> <P> +Multilingual grammars have yet another visualization option: +<B>word alignment</B>, which shows what words correspond to each other. +Technically, this means words that have the same smallest spanning subtrees +in abstract syntax. The command is <CODE>align_words = aw</CODE>: +</P> +<PRE> + > parse "this delicious cheese is very Italian" | align_words +</PRE> +<P></P> +<P> +<IMG ALIGN="middle" SRC="align2.png" BORDER="0" ALT=""> +</P> +<P> <!-- NEW --> </P> <A NAME="toc29"></A> diff --git a/doc/tutorial/gf-tutorial.t2t b/doc/tutorial/gf-tutorial.t2t index d0a298e4c..0b02f479f 100644 --- a/doc/tutorial/gf-tutorial.t2t +++ b/doc/tutorial/gf-tutorial.t2t @@ -1263,14 +1263,15 @@ Human eye may prefer to see a visualization: ``visualize_tree = vt``: > parse "this delicious cheese is very Italian" | visualize_tree ``` The tree is generated in postscript (``.ps``) file. The ``-view`` option is used for -telling what command to use to view the file. Its default is ``"gv"``, which works -on most Linux installations. On a Mac, one would probably write +telling what command to use to view the file. Its default is ``"open"``, which works +on Mac OS X. On Ubuntu Linux, one can write ``` - > parse "this delicious cheese is very Italian" | visualize_tree -view="open" + > parse "this delicious cheese is very Italian" | visualize_tree -view="eog" ``` + #MYTREE This command uses the program [Graphviz http://www.graphviz.org/], which you @@ -1365,6 +1366,17 @@ Thus Italian says ``vino italiano`` for ``Italian wine``. are put before the noun. This distinction can be controlled by parameters, which are introduced in #Rchapfour.) +Multilingual grammars have yet another visualization option: +**word alignment**, which shows what words correspond to each other. +Technically, this means words that have the same smallest spanning subtrees +in abstract syntax. The command is ``align_words = aw``: +``` + > parse "this delicious cheese is very Italian" | align_words +``` + +[align2.png] + + #NEW ===Exercises on multilinguality=== diff --git a/doc/tutorial/myparse.png b/doc/tutorial/myparse.png Binary files differnew file mode 100644 index 000000000..13b89fedb --- /dev/null +++ b/doc/tutorial/myparse.png |
