udapi.block.tutorial package

Submodules

udapi.block.tutorial.addarticles module

tutorial.AddArticles block template.

class udapi.block.tutorial.addarticles.AddArticles(zones='all')[source]

Bases: udapi.core.block.Block

Heuristically insert English articles.

process_node(node)[source]

Process a UD node

udapi.block.tutorial.addcommas module

tutorial.AddCommas block template.

class udapi.block.tutorial.addcommas.AddCommas(zones='all')[source]

Bases: udapi.core.block.Block

Heuristically insert nodes for missing commas.

process_node(node)[source]

Process a UD node

should_add_comma_before(node)[source]

udapi.block.tutorial.adpositions module

tutorial.Adpositions block template.

Example usage:

for a in */sample.conllu; do
   printf '%50s ' $a;
   udapy tutorial.Adpositions < $a;
done | tee results.txt

# What are the English postpositions?
cat UD_English/sample.conllu | udapy -TM util.Mark    node='node.upos == "ADP" and node.parent.precedes(node)' | less -R
class udapi.block.tutorial.adpositions.Adpositions(**kwargs)[source]

Bases: udapi.core.block.Block

Compute the number of prepositions and postpositions.

process_end()[source]

A hook method that is executed after processing all UD data

process_node(node)[source]

Process a UD node

udapi.block.tutorial.parse module

tutorial.Parse block template.

Usage: udapy read.Conllu zone=gold files=sample.conllu read.Conllu zone=pred files=sample.conllu transform.Flatten zones=pred tutorial.Parse zones=pred eval.Parsing gold_zone=gold util.MarkDiff gold_zone=gold write.TextModeTreesHtml marked_only=1 files=parse-diff.html

class udapi.block.tutorial.parse.Parse(zones='all')[source]

Bases: udapi.core.block.Block

Dependency parsing.

process_tree(root)[source]

Process a UD tree

Module contents