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/21 21:52] kravalova |
external:tectomt:tutorial [2009/01/22 11:11] kravalova |
||
---|---|---|---|
Line 20: | Line 20: | ||
* 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 52: | Line 53: | ||
source ~/ | source ~/ | ||
</ | </ | ||
+ | |||
+ | * In your '' | ||
+ | |||
+ | <code bash> | ||
+ | source .bashrc | ||
+ | </ | ||
+ | |||
+ | |||
Line 115: | Line 124: | ||
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 142: | Line 152: | ||
* 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 185: | Line 200: | ||
SEnglishW_to_SEnglishM:: | SEnglishW_to_SEnglishM:: | ||
SEnglishW_to_SEnglishM:: | SEnglishW_to_SEnglishM:: | ||
- | SEnglishW_to_SEnglishM:: | + | SEnglishW_to_SEnglishM:: |
SEnglishW_to_SEnglishM:: | SEnglishW_to_SEnglishM:: | ||
SEnglishM_to_SEnglishA:: | SEnglishM_to_SEnglishA:: | ||
Line 202: | Line 217: | ||
we can examine our '' | we can examine our '' | ||
+ | |||
+ | Blocks can also be parametrized. For syntax parser, we might want to use a smaller but faster model. To achieve this, replace the line | ||
+ | |||
+ | <code bash> | ||
+ | SEnglishM_to_SEnglishA:: | ||
+ | </ | ||
+ | |||
+ | with | ||
+ | |||
+ | <code bash> | ||
+ | SEnglishM_to_SEnglishA:: | ||
+ | </ | ||
You can view the trees in '' | You can view the trees in '' | ||
Line 209: | Line 236: | ||
</ | </ | ||
+ | Try to click on some nodes to see their parameters (tag, lemma, form, analytical function etc). | ||
+ | |||
+ | //Note//: For more information about tree editor TrEd, see [[http:// | ||
Line 266: | Line 296: | ||
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: | ||
+ | |||
* '' | * '' | ||
* '' | * '' | ||
+ | |||
+ | Some interesting attributes on morphologic layer are '' | ||
+ | |||
+ | <code bash> | ||
+ | tmttred sample.tmt | ||
+ | </ | ||
Our tutorial block '' | Our tutorial block '' | ||
Line 306: | Line 343: | ||
==== Task ==== | ==== Task ==== | ||
A block which, given an analytical tree ('' | A block which, given an analytical tree ('' | ||
+ | |||
+ | |||
+ | |||
+ | |||
Line 353: | Line 394: | ||
* '' | * '' | ||
- | //Note//: '' | + | //Note//: '' |
+ | //Hint//: Finite clauses in English usually require grammatical subject to be present. | ||
+ | ==== Advanced version ==== | ||
- | //Advanced version//: | + | The output of our block might still be incorrect in special cases - we don't solve coordination (see the second sentence in sample.txt) and subordinate conjunctions. |
===== Your turn: more tasks ===== | ===== Your turn: more tasks ===== | ||
+ | |||
+ | |||
+ | |||
Line 384: | Line 430: | ||
* 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 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 '' | ||
+ | |||
+ | |||
+ | |||
Line 434: | Line 485: | ||
* To see the results, you can again use TrEd ('' | * To see the results, you can again use TrEd ('' | ||
+ | **Advanced version**: What happens in case of multiword prepositions? | ||
- | //Advanced version//: What happens in case of multiword prepositions? | ||
- | ===== Further information ===== | ||
- | * [[http:// | ||
- | * Questions? Ask '' | ||
- | * Solutions to this tutorial tasks are in '' | ||
- | * [[http:// | ||
+ | ===== Further information ===== | ||
+ | * [[http:// | ||
+ | * Questions? Ask '' | ||
+ | * Solutions to this tutorial tasks are in '' | ||
+ | * [[http:// | ||