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/19 13:08] kravalova |
external:tectomt:tutorial [2009/01/20 15:26] kravalova |
||
---|---|---|---|
Line 2: | Line 2: | ||
Welcome at TectoMT Tutorial. This tutorial should take about 2 hours. | Welcome at TectoMT Tutorial. This tutorial should take about 2 hours. | ||
+ | |||
Line 7: | 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, | 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, | ||
+ | |||
===== 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 14: | Line 27: | ||
==== Installation and setup ==== | ==== Installation and setup ==== | ||
- | TODO popsat instalaci | + | * Checkout SVN repository. If you are running this installation in computer lab in Prague, you have checkout the repository into directory /home/BIG (because data quotas don't apply here): |
- | Before running any experiments with TectoMT, you must set up your environment by running | + | <code bash> |
+ | cd ~/BIG | ||
+ | svn --username < | ||
+ | </ | ||
+ | |||
+ | * In '' | ||
<code bash> | <code bash> | ||
- | source config/init_devel_environ.sh | + | cd tectomt/install |
+ | ./install.sh | ||
</ | </ | ||
+ | |||
+ | * In your '' | ||
+ | |||
+ | <code bash> | ||
+ | source ~/ | ||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ | |||
- | ==== Theoretical background ==== | ||
- | TODO obrazek | ||
Line 34: | Line 61: | ||
- | ==== TrEd ==== | ||
- | TODO malicko o TrEdu a obrazek | ||
Line 54: | Line 79: | ||
This tutorial itself has its blocks in '' | This tutorial itself has its blocks in '' | ||
+ | |||
Line 59: | Line 85: | ||
==== Layers of Linguistic Structures ==== | ==== Layers of Linguistic Structures ==== | ||
+ | |||
+ | {{ external: | ||
TectoMT blocks repository is saved in '' | TectoMT blocks repository is saved in '' | ||
Line 71: | Line 99: | ||
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 78: | Line 107: | ||
===== First application ===== | ===== First application ===== | ||
- | Once you have TectoMT installed on your machine, you can find this tutorial in '' | + | Once you have TectoMT installed on your machine, you can find this tutorial in '' |
Most applications are defined in Makefiles, which describe sequence of blocks to be applied on our data. In our particular '' | Most applications are defined in Makefiles, which describe sequence of blocks to be applied on our data. In our particular '' | ||
Line 155: | Line 184: | ||
tmttred sample.tmt | tmttred sample.tmt | ||
</ | </ | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
Line 206: | Line 242: | ||
* '' | * '' | ||
- | Our tutorial block '' | + | Our tutorial block '' |
- | * Copy the block to the right place in blocks repository '' | + | <code bash> |
- | | + | print_info: |
- | cp libs/ | + | brunblocks -S -o Tutorial:: |
- | </ | + | </ |
- | * in copied file '' | + | |
- | * Add this block to our scenario: | + | |
- | <code bash> | + | |
- | print_afun: | + | |
- | | + | |
- | </ | + | |
We can observe our new block behaviour: | We can observe our new block behaviour: | ||
<code bash> | <code bash> | ||
- | make print_afun | + | make print_info |
</ | </ | ||
+ | Try to change the block so that it prints out the information only for verbs. (You need to look at attribute '' | ||
+ | |||
+ | |||
+ | ===== Advanced block: finite clauses ===== | ||
- | ===== Advanced block: finite clauses ===== | ||
==== Motivation ==== | ==== Motivation ==== | ||
+ | |||
+ | It is assumed that finite clauses can be translated independently, | ||
+ | |||
+ | |||
==== Task ==== | ==== Task ==== | ||
- | A block which, given an analytical tree ('' | + | A block which, given an analytical tree ('' |
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
- | ==== Algorithm ==== | ||
Line 252: | Line 304: | ||
==== Instructions ==== | ==== Instructions ==== | ||
- | There is a block template with hints in '' | + | There is a block template with hints in '' |
<code bash> | <code bash> | ||
finite_clauses: | finite_clauses: | ||
brunblocks -S -o \ | brunblocks -S -o \ | ||
- | | + | |
- | | + | |
</ | </ | ||
You are going to need these methods: | You are going to need these methods: | ||
- | * '' | + | * '' |
- | * '' | + | * '' |
* '' | * '' | ||
- | * '' | + | * '' |
- | * '' | + | |
+ | //Note//: '' | ||
+ | |||
+ | //Advanced version//: The output of our block might still be incorrect in special cases - we don't solve coordination and subordinate conjunctions. | ||
Line 278: | Line 332: | ||
+ | ==== SVO typology ==== | ||
+ | |||
+ | **Motivation**: | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ==== Prepositions ==== | ||
+ | |||
+ | **Motivation**: | ||
+ | |||
+ | TODO obrazek | ||
+ | |||
+ | **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: | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | |||
+ | // | ||
+ | * On analytical layer, you can use this test to recognize prepositions: | ||
+ | * You can use block template in '' | ||
+ | |||
+ | |||
+ | //Advanced version//: What happens in case of multiword prepositions? | ||
- | ==== Coordination ==== | ||
- | This time ... | ||
- | You can use block template in '' | ||
Line 291: | Line 383: | ||
* [[http:// | * [[http:// | ||
* Questions? Ask '' | * Questions? Ask '' | ||
- | * Solutions to | + | * Solutions to this tutorial tasks are in '' |
+ | * [[http:// | ||