Download the data. The zip file contains a part of PDT annotated up to the tectogrammatical layer (t-layer), namely directory train-1
with t-files (tectogrammatical layer), a-files (analytical layer), m-files (morphological layer) and w-files (word layer).
Write a btred script that searches for a-nodes (nodes on the analytical layer) that are not referred to from the tectogrammatical layer (i.e. from any t-node).
Using the system of hooks in the btred script, compute and print a (sorted) distribution list of analytical functions (attribute afun
) of these a-nodes.
As a result of the homework, submit both the script and the resulting distribution.
4113 AuxK 3733 AuxXand ends with these lines:
11 Apos 1 Adv(The leading spaces do not matter.)
atree.rf
.
$root->attr('atree.rf')
- gets an id
of the root of the analytical tree corresponding to the tectogrammatical tree given by $root
PML_T::GetANodeByID($a_node_id)
- gets a node at the analytical layer with a given id
PML_T::GetANodes($t_node)
- gets analytical counterparts of the given tectogrammatical node (both lexical and auxiliary)
exit_hook
. Its description in the documentation is not entirely clear, it should also mention that - if used in btred - it is executed once after all input files are processed.