udapi.block.util.resegmentgold module¶
util.ResegmentGold is a block for sentence alignment and re-segmentation of two zones.
- class udapi.block.util.resegmentgold.ResegmentGold(gold_zone='gold', **kwargs)[source]¶
Bases:
Block
Sentence-align two zones (gold and pred) and resegment the pred zone.
The two zones must contain the same sequence of characters.
- static choose_root(p_tree, was_subroot, g_tree)[source]¶
Prevent multiple roots, which are forbidden in CoNLL-U.