Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
external:tectomt:tutorial [2009/01/22 11:50] kravalova |
external:tectomt:tutorial [2009/01/22 13:32] popel |
||
---|---|---|---|
Line 21: | Line 21: | ||
* Your shell is bash | * Your shell is bash | ||
* You have basic experience with bash and can read basic Perl | * You have basic experience with bash and can read basic Perl | ||
+ | |||
+ | |||
Line 37: | Line 39: | ||
==== Installation and setup ==== | ==== Installation and setup ==== | ||
- | * Checkout SVN repository. If you are running this installation in computer lab in Prague, you have to checkout the repository into directory '' | + | * Checkout SVN repository. If you are running this installation in computer lab in Prague, you have to checkout the repository into directory '' |
<code bash> | <code bash> | ||
Line 51: | Line 53: | ||
</ | </ | ||
- | * In your '' | + | * In your '' |
<code bash> | <code bash> | ||
Line 85: | Line 87: | ||
===== TectoMT Architecture ===== | ===== TectoMT Architecture ===== | ||
+ | |||
Line 94: | Line 97: | ||
* The basic units are blocks. They serve for some very limited, well defined, and often linguistically interpretable tasks (e.g., tokenization, | * The basic units are blocks. They serve for some very limited, well defined, and often linguistically interpretable tasks (e.g., tokenization, | ||
- | * To solve a more complex task, selected blocks can be chained into a block sequence, called also a scenario. Technically, | + | * To solve a more complex task, selected blocks can be chained into a block sequence, called also a scenario. Technically, |
* The highest unit is called application. Applications correspond to end-to-end tasks, be they real end-user applications (such as machine translation), | * The highest unit is called application. Applications correspond to end-to-end tasks, be they real end-user applications (such as machine translation), | ||
This tutorial itself has its blocks in '' | This tutorial itself has its blocks in '' | ||
+ | |||
Line 124: | Line 128: | ||
Blocks in block repository '' | Blocks in block repository '' | ||
- | // | + | // |
There are also other directories for other purpose blocks, for example blocks which only print out some information go to '' | There are also other directories for other purpose blocks, for example blocks which only print out some information go to '' | ||
Line 156: | Line 160: | ||
* Each bundle contains tree shaped sentence representations on various linguistic layers. In our example '' | * Each bundle contains tree shaped sentence representations on various linguistic layers. In our example '' | ||
* Trees are formed by nodes and edges. Attributes can be attached only to nodes. Edge's attributes must be stored as the lower node's attributes. Tree's attributes must be stored as attributes of the root node. | * Trees are formed by nodes and edges. Attributes can be attached only to nodes. Edge's attributes must be stored as the lower node's attributes. Tree's attributes must be stored as attributes of the root node. | ||
+ | |||
+ | |||
+ | |||
+ | |||
Line 212: | Line 220: | ||
</ | </ | ||
- | //Note//: Makefiles use tabulators to mark command lines. Make sure your lines start with 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 | ||
Line 231: | Line 239: | ||
<code bash> | <code bash> | ||
- | SEnglishM_to_SEnglishA:: | + | SEnglishM_to_SEnglishA:: |
</ | </ | ||
Line 244: | Line 252: | ||
//Note//: For more information about tree editor TrEd, see [[http:// | //Note//: For more information about tree editor TrEd, see [[http:// | ||
+ | If you are not familiar with Makefile syntax, another way of running a scenario in TectoMT is using '' | ||
+ | <code bash> | ||
+ | eval ${TMT_ROOT}/ | ||
+ | brunblocks -S -o --scen tutorial.scen -- sample.tmt | ||
+ | </ | ||
+ | Finally, yet another way is to use a simple '' | ||
+ | |||
+ | <code bash> | ||
+ | ./ | ||
+ | </ | ||
Line 331: | Line 349: | ||
===== Advanced block: finite clauses ===== | ===== Advanced block: finite clauses ===== | ||
+ | |||
Line 339: | Line 358: | ||
==== Motivation ==== | ==== Motivation ==== | ||
- | It is assumed that finite clauses can be translated independently, | + | It is assumed that finite clauses can be translated independently, |
Line 409: | Line 428: | ||
===== Your turn: more tasks ===== | ===== Your turn: more tasks ===== | ||
+ | |||
+ | |||
Line 426: | Line 447: | ||
==== SVO to SOV ==== | ==== SVO to SOV ==== | ||
- | **Motivation**: | + | **Motivation**: |
**Task**: Change the word order from SVO to SOV. | **Task**: Change the word order from SVO to SOV. | ||
Line 433: | Line 454: | ||
* You can use block template in '' | * You can use block template in '' | ||
- | * To find an object | + | * To find an object |
* For debugging, a method returning surface word order of a node is useful: '' | * For debugging, a method returning surface word order of a node is useful: '' | ||
- | * Once you have node '' | + | * Once you have the node '' |
**Advanced version**: This solution shifts object (or more objects) of a verb just in front of that verb node. So f.e.: //Mr. Brown has urged MPs.// changes to: //Mr. Brown has MPs urged.// You can try to change this solution, so the final sentence would be: //Mr. Brown MPs has urged.// You may need a method '' | **Advanced version**: This solution shifts object (or more objects) of a verb just in front of that verb node. So f.e.: //Mr. Brown has urged MPs.// changes to: //Mr. Brown has MPs urged.// You can try to change this solution, so the final sentence would be: //Mr. Brown MPs has urged.// You may need a method '' | ||
+ | |||
Line 476: | Line 498: | ||
{{ external: | {{ external: | ||
- | **Motivation**: | + | **Motivation**: |
**Task**: The task is to rehang all prepositions as indicated at the picture. You may assume that prepositions have at most 1 child. | **Task**: The task is to rehang all prepositions as indicated at the picture. You may assume that prepositions have at most 1 child. |