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 13:37] popel |
external:tectomt:tutorial [2010/04/14 01:45] popel nové bloky |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== TectoMT Tutorial ====== | ====== TectoMT Tutorial ====== | ||
- | Welcome | + | Welcome |
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 43: | Line 45: | ||
<code bash> | <code bash> | ||
cd ~/BIG | cd ~/BIG | ||
- | svn --username | + | svn --username |
</ | </ | ||
+ | |||
+ | * accept the certificate and provide a password which is same as the username ie. : //public// | ||
* In '' | * In '' | ||
Line 87: | Line 91: | ||
===== TectoMT Architecture ===== | ===== TectoMT Architecture ===== | ||
+ | |||
Line 96: | Line 101: | ||
In TectoMT, there is the following hierarchy of processing units (software components that process data): | In TectoMT, there is the following hierarchy of processing units (software components that process data): | ||
- | * 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 | + | * To solve a more complex task, selected blocks can be chained into a block sequence, called |
- | * 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 |
This tutorial itself has its blocks in '' | This tutorial itself has its blocks in '' | ||
Line 131: | Line 136: | ||
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 146: | Line 152: | ||
Once you have TectoMT installed on your machine, you can find this tutorial in '' | Once you have TectoMT installed on your machine, you can find this tutorial in '' | ||
- | Most applications are defined in Makefiles, which describe sequence of blocks to be applied on our data. In our particular | + | Most applications are defined in '' |
We can run the application: | We can run the application: | ||
Line 157: | Line 163: | ||
* One physical '' | * One physical '' | ||
- | * A document consists of a sequence of bundles (''< | + | * A document consists of a sequence of bundles (element |
- | * 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 193: | Line 201: | ||
===== Changing the scenario ===== | ===== Changing the scenario ===== | ||
- | We'll now add a syntax analysis (dependency parsing) to our scenario by adding | + | We'll now add a syntax analysis (dependency parsing) to our scenario by adding |
- | < | + | < |
- | analyze: | + | SEnglishW_to_SEnglishM:: |
- | brunblocks -S -o \ | + | SEnglishW_to_SEnglishM:: |
- | | + | SEnglishW_to_SEnglishM:: |
- | SEnglishW_to_SEnglishM:: | + | SEnglishW_to_SEnglishM:: |
- | SEnglishW_to_SEnglishM:: | + | |
- | SEnglishW_to_SEnglishM:: | + | |
- | -- sample.tmt | + | |
</ | </ | ||
Line 208: | Line 213: | ||
<code bash> | <code bash> | ||
- | analyze: | + | SEnglishW_to_SEnglishM:: |
- | brunblocks -S -o \ | + | SEnglishW_to_SEnglishM:: |
- | | + | SEnglishW_to_SEnglishM:: |
- | SEnglishW_to_SEnglishM:: | + | SEnglishW_to_SEnglishM:: |
- | SEnglishW_to_SEnglishM:: | + | SEnglishM_to_SEnglishA:: |
- | SEnglishW_to_SEnglishM:: | + | SEnglishM_to_SEnglishA:: |
- | SEnglishM_to_SEnglishA:: | + | SEnglishM_to_SEnglishA:: |
- | SEnglishM_to_SEnglishA:: | + | SEnglishM_to_SEnglishA:: |
- | SEnglishM_to_SEnglishA:: | + | SEnglishM_to_SEnglishA:: |
- | -- sample.tmt | + | |
</ | </ | ||
- | |||
- | //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 233: | Line 235: | ||
<code bash> | <code bash> | ||
- | SEnglishM_to_SEnglishA:: | + | SEnglishM_to_SEnglishA:: |
</ | </ | ||
Line 239: | Line 241: | ||
<code bash> | <code bash> | ||
- | SEnglishM_to_SEnglishA:: | + | SEnglishM_to_SEnglishA:: |
</ | </ | ||
Line 252: | Line 254: | ||
//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 '' | + | If you are not familiar with '' |
- | + | ||
- | <code bash> | + | |
- | eval ${TMT_ROOT}/ | + | |
- | brunblocks -S -o --scen tutorial.scen -- sample.tmt | + | |
- | </ | + | |
- | + | ||
- | Finally, yet another way is to use a simple '' | + | |
<code bash> | <code bash> | ||
Line 322: | Line 317: | ||
* '' | * '' | ||
- | Some interesting attributes on morphologic layer are '' | + | Some interesting attributes on morphologic layer are '' |
<code bash> | <code bash> | ||
Line 328: | Line 323: | ||
</ | </ | ||
- | Our tutorial block '' | + | Our tutorial block '' |
<code bash> | <code bash> | ||
Line 366: | Line 361: | ||
==== Task ==== | ==== Task ==== | ||
A block which, given an analytical tree ('' | A block which, given an analytical tree ('' | ||
+ | |||
+ | |||
Line 459: | Line 456: | ||
* Once you have the 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 '' |