Closed michnov closed 8 years ago
It looks really good to me :+1: . Just a question – what are the methods that are left in Treex::Tool::Align::Utils
?
Treex::Tool::Align::Utils
remains heterogenous with:
add_aligned_node
and aligned_transitively
that might be also included in Treex::Core::Node::Aligned
but I was lazy to move them, refactor their calls and write documentation and tests for them :)
aligned_robust
and access_*
used for rule-based alignment of coreferential expressionsprint_nodes
that has nothing to do with alignment at all
Good work, thanks. The remaining content of Treex::Tool::Align::Utils
can be solved later.
A new role
Core::Node::Aligned
forCore::Node
, providing alignment accessors. It offers the original functions so far available inCore::Node
as well as the additional functions fromTool::Align::Utils
that access aligned nodes regardless the orientation of the links (undirected access). However, the two sources are not just stuck together in the target role. Functionality of some methods has been slightly modified. Namely:get_aligned_nodes
get_directed_aligned_nodes
instead.get_directed_aligned_nodes
,get_undirected_aligned_nodes
get_aligned_nodes
with directed and undirected access, respectivelyget_directed_aligned_nodes
does the same job as the originalget_aligned_nodes
(except that it does not return undefs), so all uses ofget_aligned_nodes
in Treex have been changed toget_directed_aligned_nodes
is_aligned_to
get_aligned_nodes
method.is_directed_aligned_to
,is_undirected_aligned_to
is_aligned_to
with directed and undirected access, respectivelyis_directed_aligned_to
does the same job as the originalis_aligned_to
, so all uses ofis_aligned_to
in Treex have been changed tois_directed_aligned_to
There is one additional method
delete_aligned_nodes_by_filter
combiningget_aligned_nodes
anddelete_aligned_node
. In this case, undirected access is default, if not set differently by the filter.[ closes #47 ]