Both sides previous revision
Previous revision
|
Next revision
Both sides next revision
|
external:tectomt:tutorial [2009/01/22 14:06] kravalova |
external:tectomt:tutorial [2009/01/22 14:13] kravalova |
Once you have TectoMT installed on your machine, you can find this tutorial in ''applications/tutorial/''. After you ''cd'' into this directory, you can see our plain text sample data in ''sample.txt''. | Once you have TectoMT installed on your machine, you can find this tutorial in ''applications/tutorial/''. After you ''cd'' into this directory, you can see our plain text sample data in ''sample.txt''. |
| |
Most applications are defined in Makefiles, which describe sequence of blocks to be applied on our data. In our particular ''Makefile'', four blocks are going to be applied on our sample text: sentence segmentation, tokenization, tagging and lemmatization. Since we have our input text in plain text format, the file is going to be converted into ''tmt'' format beforehand (the ''in'' target in the Makefile). | Most applications are defined in ''Makefiles'', which describe sequence of blocks to be applied on our data. In our particular ''Makefile'', four blocks are going to be applied on our sample text: sentence segmentation, tokenization, tagging and lemmatization. Since we have our input text in plain text format, the file is going to be converted into ''tmt'' format beforehand (the ''in'' target in the ''Makefile''). |
| |
We can run the application: | We can run the application: |
</code> | </code> |
| |
//Note//: Makefiles use tabulators to mark command lines. Make sure your lines start with a tabulator (or two tabulators) and not, for example, with 4 spaces. | //Note//: ''Makefiles'' use tabulators to mark command lines. Make sure your lines start with a tabulator (or two tabulators) and not, for example, with 4 spaces. |
| |
After running | After running |
//Note//: For more information about tree editor TrEd, see [[http://ufal.mff.cuni.cz/~pajas/tred/ar01-toc.html|TrEd User's Manual]]. | //Note//: For more information about tree editor TrEd, see [[http://ufal.mff.cuni.cz/~pajas/tred/ar01-toc.html|TrEd User's Manual]]. |
| |
If you are not familiar with Makefile syntax, another way of running a scenario in TectoMT is using ''.scen'' file (see ''applications/tutorial.scen''). This file lists the blocks to be run - one block on a single line. | If you are not familiar with ''Makefile'' syntax, another way of running a scenario in TectoMT is using ''.scen'' file (see ''applications/tutorial.scen''). This file lists the blocks to be run - one block on a single line. |
| |
<code bash> | <code bash> |
</code> | </code> |
| |
Our tutorial block ''Print_node_info.pm'' is ready to use. You only need to add this block to our scenario, e.g. as a new Makefile target: | Our tutorial block ''Print_node_info.pm'' is ready to use. You only need to add this block to our scenario, e.g. as a new ''Makefile'' target: |
| |
<code bash> | <code bash> |
==== Task ==== | ==== Task ==== |
A block which, given an analytical tree (''SEnglishA''), fills each ''a-node'' with boolean attribute ''is_clause_head'' which is set to ''1'' if the ''a-node'' corresponds to a finite verb, and to ''0'' otherwise. | A block which, given an analytical tree (''SEnglishA''), fills each ''a-node'' with boolean attribute ''is_clause_head'' which is set to ''1'' if the ''a-node'' corresponds to a finite verb, and to ''0'' otherwise. |
| |
| |
| |