[ 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/20 16:59]
popel
external:tectomt:tutorial [2009/01/20 17:43]
popel
Line 103: Line 103:
  
 There are also other directories for other purpose blocks, for example blocks which only print out some information go to ''libs/Print''. Our tutorial blocks are in ''libs/blocks/Tutorial''. There are also other directories for other purpose blocks, for example blocks which only print out some information go to ''libs/Print''. Our tutorial blocks are in ''libs/blocks/Tutorial''.
 +
  
  
Line 111: Line 112:
 ===== First application ===== ===== First application =====
  
-Once you have TectoMT installed on your machine, you can find this tutorial in ''applications/tutorial/''. After you cd in to this directory, you can see our plain text sample data in ''sample.txt''+Once you have TectoMT installed on your machine, you can find this tutorial in ''applications/tutorial/''. After you ''cd'' into this directory, you can see our plain text sample data in ''sample.txt''
  
-Most applications are defined in Makefiles, which describe sequence of blocks to be applied on our data. In our particular ''Makefile'', four blocks are going to be applied on our sample text: sentence segmentation, tokenization, tagging and lemmatization. Since we have our input text in plain text format, the file is going to be converted into ''tmt'' format beforehand (the ''in'' section).+Most applications are defined in Makefiles, which describe sequence of blocks to be applied on our data. In our particular ''Makefile'', four blocks are going to be applied on our sample text: sentence segmentation, tokenization, tagging and lemmatization. Since we have our input text in plain text format, the file is going to be converted into ''tmt'' format beforehand (the ''in'' target in the Makefile).
  
 We can run the application: We can run the application:
Line 121: Line 122:
 </code> </code>
  
-Our plain text data ''sample.txt'' have been transformed into ''tmt'', internal TectoMT format, and saved into ''sample.tmt''. Then, all four blocks have been loaded and our data has been processed. We can now examine ''sample.tmt'' using a regular text editor. We'll now stop and describe data structure in TectoMT.+Our plain text data ''sample.txt'' have been transformed into ''tmt'', an internal TectoMT format, and saved into ''sample.tmt''. Then, all four blocks have been loaded and our data has been processed. We can now examine ''sample.tmt'' using a regular text editor. We'll now stop and describe data structure in TectoMT.
  
-  * One physical file corresponds to one document.+  * One physical ''tmt'' file corresponds to one document.
   * A document consists of a sequence of bundles (''<bundle>''), mirroring a sequence of natural language sentences originating from the text. So, for one sentence we have one ''<bundle>''.   * A document consists of a sequence of bundles (''<bundle>''), mirroring a sequence of natural language sentences originating from the text. So, for one sentence we have one ''<bundle>''.
   * 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 148: 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 syntax analysis (dependency parsing) to our scenario by adding four more blocks. Instead of 
  
 <code bash> <code bash>
Line 156: Line 158:
                 SEnglishW_to_SEnglishM::Penn_style_tokenization \                 SEnglishW_to_SEnglishM::Penn_style_tokenization \
                 SEnglishW_to_SEnglishM::TagTnT \                 SEnglishW_to_SEnglishM::TagTnT \
-                SEnglishW_to_SEnglishM::Lemmatize_mtree -- sample.tmt+                SEnglishW_to_SEnglishM::Lemmatize_mtree 
 +        -- sample.tmt
 </code> </code>
  
Line 167: Line 170:
                 SEnglishW_to_SEnglishM::Penn_style_tokenization \                 SEnglishW_to_SEnglishM::Penn_style_tokenization \
                 SEnglishW_to_SEnglishM::TagTnT \                 SEnglishW_to_SEnglishM::TagTnT \
-                SEnglishW_to_SEnglishM::Lemmatize_mtree  \+                SEnglishW_to_SEnglishM::Lemmatize_mtree \
                 SEnglishM_to_SEnglishA::McD_parser_local \                 SEnglishM_to_SEnglishA::McD_parser_local \
                 SEnglishM_to_SEnglishA::Fix_McD_Tree \                 SEnglishM_to_SEnglishA::Fix_McD_Tree \
-                SEnglishM_to_SEnglishA::Fill_afun_after_McD -- sample.tmt+                SEnglishM_to_SEnglishA::Fill_afun_after_McD 
 +        -- sample.tmt
 </code> </code>
  

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