udapi.block.ud.addpuncttype module

Some UD treebanks use features PunctType and PunctSide that classify punctuation symbols. This block can be used to add such features to data where they are missing – the classification is mostly deterministic. If the input data already contains such features, their values will be overwritten.

class udapi.block.ud.addpuncttype.AddPunctType(zones='all', if_empty_tree='process', **kwargs)[source]

Bases: Block

Add features PunctType and PunctSide where applicable.

process_node(node)[source]

Process a UD node