udapi.block.ud.de.addmwt module

Block ud.de.AddMwt for heuristic detection of German contractions.

According to the UD guidelines, contractions such as “am” = “an dem” should be annotated using multi-word tokens.

Notice that this should be used only for converting existing conllu files. Ideally a tokenizer should have already split the MWTs.

class udapi.block.ud.de.addmwt.AddMwt(zones='all', if_empty_tree='process', **kwargs)[source]

Bases: AddMwt

Detect and mark MWTs (split them into words and add the words to the tree).

multiword_analysis(node)[source]

Return a dict with MWT info or None if node does not represent a multiword token.