udapi.block.util.markmwtbugsatnodes module

util.MarkMwtBugsAtNodes copies Bug attributes from MISC of multiword tokens to MISC of member nodes. Otherwise they will be ignored when write.TextModeTrees marked_only=1 is called.

class udapi.block.util.markmwtbugsatnodes.MarkMwtBugsAtNodes(zones='all', if_empty_tree='process', **kwargs)[source]

Bases: Block

If a node belongs to a multiword token and the MWT has Bug in MISC, copy the Bug to the node so that filtering trees with bugs works. The same bug note will be copied to all nodes in the MWT.

bug(node, bugstring)[source]
process_node(node)[source]

Process a UD node