[ 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 14:12]
kravalova
external:tectomt:tutorial [2009/01/20 16:58]
popel
Line 8: Line 8:
  
 TectoMT is a highly modular NLP (Natural Language Processing) software system implemented in Perl programming language under Linux. It is primarily aimed at Machine Translation, making use of the ideas and technology created during the Prague Dependency Treebank project. At the same time, it is also hoped to significantly facilitate and accelerate development of software solutions of many other NLP tasks, especially due to re-usability of the numerous integrated processing modules (called blocks), which are equipped with uniform object-oriented interfaces.  TectoMT is a highly modular NLP (Natural Language Processing) software system implemented in Perl programming language under Linux. It is primarily aimed at Machine Translation, making use of the ideas and technology created during the Prague Dependency Treebank project. At the same time, it is also hoped to significantly facilitate and accelerate development of software solutions of many other NLP tasks, especially due to re-usability of the numerous integrated processing modules (called blocks), which are equipped with uniform object-oriented interfaces. 
 +
  
 ===== Prerequisities ===== ===== Prerequisities =====
  
 +In this tutorial, we assume 
  
 +  * Your system is Linux
 +  * Your shell is bash
 +  * You have basic experience bash and you can read Perl
  
  
Line 17: Line 22:
  
  
-==== Installation and setup ==== 
  
-  * Install TrED TODO 
  
-  * Checkout SVN repository. If you are running this installation in computer lab in Prague, you have to create the repository in directory /home/BIG (because data quota don't apply here):+ 
 + 
 +==== Installation and setup ==== 
 + 
 +  * Checkout SVN repository. If you are running this installation in computer lab in Prague, you have to checkout the repository into directory ''/home/BIG'' (because data quotas don't apply here):
  
 <code bash> <code bash>
Line 61: Line 68:
  
 ===== TectoMT Architecture ===== ===== TectoMT Architecture =====
 +
  
  
Line 68: Line 76:
 In TectoMT, there is the following hierarchy of processing units (software components that process data): In TectoMT, there is the following hierarchy of processing units (software components that process data):
  
-  * The basic units are blocks. They serve for some very limited, well defined, and often linguistically interpretable tasks (e.g., tokenization, tagging, parsing). Blocks are not parametrizable. Technically, blocks are Perl classes inherited from ''TectoMT::Block''. The blocks repository is in ''libs/blocks/''.+  * The basic units are blocks. They serve for some very limited, well defined, and often linguistically interpretable tasks (e.g., tokenization, tagging, parsing). Technically, blocks are Perl classes inherited from ''TectoMT::Block'', each saved in a separate file. The blocks repository is in ''libs/blocks/''.
   * To solve a more complex task, selected blocks can be chained into a block sequence, called also a scenario. Technically, scenarios are instances of ''TectoMT::Scenario'' class, but in some situations (e.g. on the command line) it is sufficient to specify the scenario simply by listing block names separated with spaces.   * To solve a more complex task, selected blocks can be chained into a block sequence, called also a scenario. Technically, scenarios are instances of ''TectoMT::Scenario'' class, but in some situations (e.g. on the command line) it is sufficient to specify the scenario simply by listing block names separated with spaces.
-  * The highest unit is called application. Applications correspond to end-to-end tasks, be they real end-user applications (such as machine translation), or 'only' NLP-related experiments. Technically, applications are often implemented as ''Makefiles'', which only glue the components existing in TectoMT. Some demo applications can be found in ''applications''+  * The highest unit is called application. Applications correspond to end-to-end tasks, be they real end-user applications (such as machine translation), or 'only' NLP-related experiments. Technically, applications are often implemented as ''Makefiles'', which only glue the components existing in TectoMT. Some demo applications can be found in ''applications''.
  
 This tutorial itself has its blocks in ''libs/blocks/Tutorial'' and the application in ''applications/tutorial''. This tutorial itself has its blocks in ''libs/blocks/Tutorial'' and the application in ''applications/tutorial''.
 +
  
  
Line 84: Line 93:
 TectoMT blocks repository is saved in ''libs/blocks/''. In correspondence with ..., the blocks are located in directories describing their purpose.  TectoMT blocks repository is saved in ''libs/blocks/''. In correspondence with ..., the blocks are located in directories describing their purpose. 
  
-Thus, the set of TectoMT layers is Cartesian product {S,T} x {English,Czech} x {W,M,P,A,T}, in which:+Thus, the set of TectoMT layers is Cartesian product {S,T} x {English,Czech,...} x {W,M,P,A,T}, in which:
  
   * {S,T} distinguishes whether the data was created by analysis or transfer/synthesis (mnemonics: S and T correspond to (S)ource and (T)arget in MT perspective).   * {S,T} distinguishes whether the data was created by analysis or transfer/synthesis (mnemonics: S and T correspond to (S)ource and (T)arget in MT perspective).
Line 90: Line 99:
   * {W,M,P,A,T...} represents the layer of description in terms of PDT 2.0 (W - word layer, M - morphological layer, A - analytical layer, T - tectogrammatical layer) or extensions (P - phrase-structure layer).   * {W,M,P,A,T...} represents the layer of description in terms of PDT 2.0 (W - word layer, M - morphological layer, A - analytical layer, T - tectogrammatical layer) or extensions (P - phrase-structure layer).
  
-//Example//: Block adding Czech morphological tags (pos, case, gender, etc.) can be found in ''libs/blocks/SCzechW_toSCzechM/Simple_tagger.pm''.+//Example//: Block adding Czech morphological tags (pos, case, gender, etc.) can be found in ''libs/blocks/SCzechW_to_SCzechM/Simple_tagger.pm''.
  
 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/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/Tutorial''.
Line 325: Line 334:
  
  
-==== SVO typology ==== 
  
-TODO+ 
 + 
 + 
 + 
 + 
 +==== SVO to SOV ==== 
 + 
 +**Motivation**: During translation from an SVO based language (English) to an SOV based language (Korean) we might need to change the word order from SVO to SOV.  
 + 
 +**Task**: Change the word order from SVO to SOV. 
 + 
 +**Instructions**:  
 + 
 +  * To find an object to a verb, look for objects among effective children of a verb (''$child->get_attr('afun') eq 'Obj' ''). That implies working on analytical layer. 
 +  * Once you have node ''$object'' and node ''$verb'', use method TODO  
 +  * For debugging, a method returning word order of a node is useful: ''$node->get_attr('ord')''. It can be used to print out nodes sorted by attribute ''ord''
 + 
 + 
 + 
 + 
  
  
Line 345: Line 373:
 ==== Prepositions ==== ==== Prepositions ====
  
-In dependency approach a question "where to hang prepositions" arises. In praguian style (PDT), prepositions are heads of the subtree and the noun/pronoun is dependent on the preposition. However, another ordering might be preferable: The noun/pronoun might be the head of subtree, while the preposition would take the role of a modifier.+**Motivation**: In dependency approach a question "where to hang prepositions" arises. In praguian style (PDT), prepositions are heads of the subtree and the noun/pronoun is dependent on the preposition. However, another ordering might be preferable: The noun/pronoun might be the head of subtree, while the preposition would take the role of a modifier.
  
 TODO obrazek TODO obrazek
  
-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. 
 + 
 +** Instructions**:
  
 You are going to need these new methods: You are going to need these new methods:
Line 357: Line 387:
  
 //Hint//:  //Hint//: 
-  * On analytical layer, you can use this test to recognize prepositions: ''$afun eq 'AuxP' '' +  * On analytical layer, you can use this test to recognize prepositions: ''$node->get_attr('afun'eq 'AuxP' '' 
   * You can use block template in ''libs/blocks/BlockTemplate.pm''. To see the results, you can again use TrEd (''tmttred sample.tmt'')   * You can use block template in ''libs/blocks/BlockTemplate.pm''. To see the results, you can again use TrEd (''tmttred sample.tmt'')
  

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