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/20 17:10] popel |
external:tectomt:tutorial [2009/01/21 10:42] kravalova |
||
---|---|---|---|
Line 128: | Line 128: | ||
* 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 equivalently 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 equivalently stored as the lower node's attributes. Tree's attributes must be stored as attributes of the root node. | ||
+ | |||
Line 149: | Line 150: | ||
===== Changing the scenario ===== | ===== Changing the scenario ===== | ||
- | We'll now add syntax analysis to our scenario by adding four more blocks. Instead of | + | We'll now add a syntax analysis |
<code bash> | <code bash> | ||
Line 157: | Line 158: | ||
SEnglishW_to_SEnglishM:: | SEnglishW_to_SEnglishM:: | ||
SEnglishW_to_SEnglishM:: | SEnglishW_to_SEnglishM:: | ||
- | SEnglishW_to_SEnglishM:: | + | SEnglishW_to_SEnglishM:: |
+ | | ||
</ | </ | ||
Line 168: | Line 170: | ||
SEnglishW_to_SEnglishM:: | SEnglishW_to_SEnglishM:: | ||
SEnglishW_to_SEnglishM:: | SEnglishW_to_SEnglishM:: | ||
- | SEnglishW_to_SEnglishM:: | + | SEnglishW_to_SEnglishM:: |
SEnglishM_to_SEnglishA:: | SEnglishM_to_SEnglishA:: | ||
SEnglishM_to_SEnglishA:: | SEnglishM_to_SEnglishA:: | ||
- | SEnglishM_to_SEnglishA:: | + | SEnglishM_to_SEnglishA:: |
+ | | ||
</ | </ | ||
Line 189: | Line 192: | ||
tmttred sample.tmt | tmttred sample.tmt | ||
</ | </ | ||
+ | |||
Line 236: | Line 240: | ||
This block illustrates some of the most common methods for accessing objects: | This block illustrates some of the most common methods for accessing objects: | ||
- | * '' | + | * '' |
* '' | * '' | ||
- | * '' | + | * '' |
- | * '' | + | * '' |
- | * '' | + | * '' |
- | * '' | + | * '' |
Attributes of documents, bundles or nodes can be accessed by attribute getters and setters, for example: | Attributes of documents, bundles or nodes can be accessed by attribute getters and setters, for example: | ||
Line 247: | Line 251: | ||
* '' | * '' | ||
- | Our tutorial block '' | + | Our tutorial block '' |
<code bash> | <code bash> | ||
Line 260: | Line 264: | ||
</ | </ | ||
- | Try to change the block so that it prints out the information only for verbs. (You need to look at attribute '' | + | Try to change the block so that it prints out the information only for verbs. (You need to look at an attribute '' |
Line 277: | Line 281: | ||
It is assumed that finite clauses can be translated independently, | It is assumed that finite clauses can be translated independently, | ||
+ | |||
Line 282: | Line 287: | ||
==== Task ==== | ==== Task ==== | ||
- | A block which, given an analytical tree ('' | + | A block which, given an analytical tree ('' |
+ | |||
Line 309: | Line 316: | ||
==== Instructions ==== | ==== Instructions ==== | ||
- | There is a block template with hints in '' | + | There is a block template with hints in '' |
<code bash> | <code bash> | ||
Line 315: | Line 322: | ||
brunblocks -S -o \ | brunblocks -S -o \ | ||
Tutorial:: | Tutorial:: | ||
- | Tutorial:: | + | Tutorial:: |
+ | | ||
</ | </ | ||
You are going to need these methods: | You are going to need these methods: | ||
- | * '' | + | * '' |
* '' | * '' | ||
* '' | * '' | ||
* '' | * '' | ||
- | //Note//: '' | + | //Note//: '' |
- | //Advanced version//: The output of our block might still be incorrect in special cases - we don't solve coordination and subordinate conjunctions. | + | //Advanced version//: The output of our block might still be incorrect in special cases - we don't solve coordination |
Line 353: | Line 361: | ||
* Once you have node '' | * Once you have node '' | ||
* For debugging, a method returning word order of a node is useful: '' | * For debugging, a method returning word order of a node is useful: '' | ||
+ | |||
+ | |||
+ | |||
Line 376: | Line 387: | ||
**Motivation**: | **Motivation**: | ||
- | |||
- | TODO obrazek | ||
**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. | ||
Line 394: | Line 403: | ||
//Advanced version//: What happens in case of multiword prepositions? | //Advanced version//: What happens in case of multiword prepositions? | ||
- | |||
- | |||
- | |||
- | |||
- | |||