udapi.block.ud.setspaceafter module¶
Block SetSpaceAfter for heuristic setting of SpaceAfter=No.
Usage: udapy -s ud.SetSpaceAfter < in.conllu > fixed.conllu
Author: Martin Popel
- class udapi.block.ud.setspaceafter.SetSpaceAfter(not_after='¡ ¿ ( [ { „ /', not_before='. , ; : ! ? } ] ) / ?? ??? !! !!! ... …', fix_text=True, extra_not_after='', extra_not_before='', **kwargs)[source]¶
Bases:
Block
Block for heuristic setting of the SpaceAfter=No MISC attribute.
- static is_goeswith_exception(node)[source]¶
Is this node excepted from SpaceAfter=No because of the goeswith deprel?
Deprel=goeswith means that a space was (incorrectly) present in the original text, so we should not add SpaceAfter=No in these cases. We expect valid annotation of goeswith (no gaps, first token as head).