udapi.block.write.sentences module

Sentences class is a writer for plain-text sentences.

class udapi.block.write.sentences.Sentences(if_missing='detokenize', newdoc=None, newpar=None, **kwargs)[source]

Bases: BaseWriter

A writer of plain-text sentences (one sentence per line).

Usage: udapy write.Sentences if_missing=empty < my.conllu > my.txt udapy write.Sentences newdoc=1 newpar=1 < my.conllu > my.txt

process_tree(tree)[source]

Process a UD tree