Both sides previous revision
Previous revision
Next revision
|
Previous revision
Next revision
Both sides next revision
|
external:tectomt:tutorial [2009/01/20 18:10] popel |
external:tectomt:tutorial [2009/01/21 10:42] kravalova |
| |
It is assumed that finite clauses can be translated independently, which would reduce computational complexity or make parallel translation possible. We could even use hybrid translation - each finite clause could be translated by the most self-confident translation system. In this task, we are going to split the sentence into finite clauses. | It is assumed that finite clauses can be translated independently, which would reduce computational complexity or make parallel translation possible. We could even use hybrid translation - each finite clause could be translated by the most self-confident translation system. In this task, we are going to split the sentence into finite clauses. |
| |
| |
| |
| |
==== Task ==== | ==== Task ==== |
A block which, given an analytical tree (''SEnglishA''), fills each ''a-node'' with boolean attribute ''is_head'' which is set to ''1'' if the ''a-node'' corresponds to a finite verb, and to ''0'' otherwise. | A block which, given an analytical tree (''SEnglishA''), fills each ''a-node'' with boolean attribute ''is_clause_head'' which is set to ''1'' if the ''a-node'' corresponds to a finite verb, and to ''0'' otherwise. |
| |
| |
==== Instructions ==== | ==== Instructions ==== |
| |
There is a block template with hints in ''libs/blocks/Tutorial/Mark_heads.pm''. You should edit the block so that the ouput of this block is the same a-tree, in addition with attribute ''is_head'' attached to each ''a-node''. There is also a printing block ''libs/blocks/Print_finite_clauses.pm'' which will print out the ''a-nodes'' grouped by clauses: | There is a block template with hints in ''libs/blocks/Tutorial/Mark_heads.pm''. You should edit the block so that the output of this block is the same a-tree, in addition with attribute ''is_clause_head'' attached to each ''a-node''. There is also a printing block ''libs/blocks/Print_finite_clauses.pm'' which will print out the ''a-nodes'' grouped by clauses: |
| |
<code bash> | <code bash> |
| |
| |
//Advanced version//: The output of our block might still be incorrect in special cases - we don't solve coordination and subordinate conjunctions. | //Advanced version//: The output of our block might still be incorrect in special cases - we don't solve coordination (see the second sentence in sample.txt) and subordinate conjunctions. |
| |
| |
* Once you have node ''$object'' and node ''$verb'', use method TODO | * 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''. | * 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''. |
| |
| |
| |
| |
| |
| |
**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. | **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 | |
| |
**Task**: 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. |
| |
//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? |
| |
| |
| |
| |
| |
| |
| |