[ 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/21 21:52]
kravalova
external:tectomt:tutorial [2009/01/22 10:33]
kravalova
Line 142: Line 142:
   * 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 185: Line 186:
                 SEnglishW_to_SEnglishM::Sentence_segmentation_simple \                 SEnglishW_to_SEnglishM::Sentence_segmentation_simple \
                 SEnglishW_to_SEnglishM::Penn_style_tokenization \                 SEnglishW_to_SEnglishM::Penn_style_tokenization \
-                SEnglishW_to_SEnglishM::TagTnT \+                SEnglishW_to_SEnglishM::TagMxPost \
                 SEnglishW_to_SEnglishM::Lemmatize_mtree \                 SEnglishW_to_SEnglishM::Lemmatize_mtree \
                 SEnglishM_to_SEnglishA::McD_parser_local \                 SEnglishM_to_SEnglishA::McD_parser_local \
Line 362: Line 363:
  
 ===== Your turn: more tasks ===== ===== Your turn: more tasks =====
 +
 +
  
  
Line 384: Line 387:
   * For debugging, a method returning surface word order of a node is useful: ''$node<nowiki>-></nowiki>get_attr('ord')''. It can be used to print out nodes sorted by attribute ''ord''.   * For debugging, a method returning surface word order of a node is useful: ''$node<nowiki>-></nowiki>get_attr('ord')''. It can be used to print out nodes sorted by attribute ''ord''.
   * 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)''.
 +Subjects should have attribute '''afun' eq 'Sb'''.
 +
 +
  
  
Line 436: Line 444:
  
 //Advanced version//: What happens in case of multiword prepositions? For example, ''because of'', ''instead of''. Can you handle it? //Advanced version//: What happens in case of multiword prepositions? For example, ''because of'', ''instead of''. Can you handle it?
 +
  
  
Line 441: Line 450:
   * [[http://ufallab2.ms.mff.cuni.cz/~bojar/cruise_control_tmt/last_doc/generated/guide/guidelines.html|TectoMT Developer's Guide]] - obsolete   * [[http://ufallab2.ms.mff.cuni.cz/~bojar/cruise_control_tmt/last_doc/generated/guide/guidelines.html|TectoMT Developer's Guide]] - obsolete
   * Questions? Ask ''kravalova'' at ''ufal.mff.cuni.cz''   * Questions? Ask ''kravalova'' at ''ufal.mff.cuni.cz''
-  * Solutions to this tutorial tasks are in ''libs/blocks/Tutorial/*solution.pm''.+  * Solutions to this tutorial tasks are in ''libs/blocks/Tutorial/*solution*.pm''.
   * [[http://ufal.mff.cuni.cz/~pajas/tred/|TrEd]] - tree editor   * [[http://ufal.mff.cuni.cz/~pajas/tred/|TrEd]] - tree editor
  

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