[ Skip to the content ]

Institute of Formal and Applied Linguistics Wiki


[ Back to the navigation ]

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
external:tectomt:tutorial [2009/01/22 10:34]
kravalova
external:tectomt:tutorial [2009/01/22 10:45]
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 ~/BIG/tectomt/config/init_devel_environ.sh     source ~/BIG/tectomt/config/init_devel_environ.sh
 </code> </code>
 +
 +  * In your ''.bash_profile'' file, add line 
 +
 +<code bash>
 +    source .bashrc
 +</code>
 +
 +
  
  
Line 142: Line 151:
   * Each bundle contains tree shaped sentence representations on various linguistic layers. In our example ''sample.tmt'' we have morphological tree (''SEnglishM'') in each bundle. Later on, also an analytical layer (''SEnglishA'') will appear in each bundle as we proceed with our analysis.    * Each bundle contains tree shaped sentence representations on various linguistic layers. In our example ''sample.tmt'' we have morphological tree (''SEnglishM'') in each bundle. Later on, also an analytical layer (''SEnglishA'') will appear in each bundle as we proceed with our analysis. 
   * 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 210: Line 221:
 </code> </code>
  
 +Try to click on some nodes to see their parameters (tag, lemma, form, analytical function etc).
 +
 +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::McD_parser_local \
 +</code>
 +
 +with
 +
 +<code bash>
 +SEnglishM_to_SEnglishA::McD_parser_local MT_PARAM_MCD_EN_MODEL=conll_mcd_order2_0.1.model \
 +</code>
  
  
Line 364: Line 388:
  
 ===== Your turn: more tasks ===== ===== Your turn: more tasks =====
 +
  
  
Line 389: Line 414:
   * Once you have node ''$object'' and node ''$verb'', use method ''$object<nowiki>-></nowiki>shift_before_node($verb)''. This method takes the whole subtree under node ''$object'' and re-counts the attributes ''ord'' (surface word order) so that all nodes in subtree under ''$object'' have smaller ''ord'' than ''$verb''. That is, the method rearranges the surface word order from VO to OV.   * Once you have node ''$object'' and node ''$verb'', use method ''$object<nowiki>-></nowiki>shift_before_node($verb)''. This method takes the whole subtree under node ''$object'' and re-counts the attributes ''ord'' (surface word order) so that all nodes in subtree under ''$object'' have smaller ''ord'' than ''$verb''. That is, the method rearranges the surface word order from VO to OV.
  
-**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 ''$node->shift_after_subtree($root_of_that_subtree)''. +**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 ''$node->shift_after_subtree($root_of_that_subtree)''. Subjects should have attribute '''afun' eq 'Sb'''.
-Subjects should have attribute '''afun' eq 'Sb'''.+
  
  

[ Back to the navigation ] [ Back to the content ]