udapi.core.block module

Block class represents the basic Udapi processing unit.

class udapi.core.block.Block(zones='all', if_empty_tree='process', **kwargs)[source]

Bases: object

The smallest processing unit for processing Universal Dependencies data.

Parameters: zones: which zone to process (default=”all”) if_empty_tree: what to do when encountering a tree with no nodes.

Possible values are: process (default), skip, skip_warn, fail, delete.

after_process_document(document)[source]

This method is called after each process_document.

apply_on_document(document)[source]
before_process_document(document)[source]

This method is called before each process_document.

block_name()[source]
process_bundle(bundle)[source]

Process a UD bundle

process_coref_entity(entity)[source]

This method is called on each coreference entity in the document.

process_coref_mention(mention)[source]

This method is called on each coreference mention in the document.

process_document(document)[source]

Process a UD document

process_empty_node(_)[source]

Process an empty node (in enhanced dependencies)

process_end()[source]

A hook method that is executed after processing all UD data

process_node(_)[source]

Process a UD node

process_start()[source]

A hook method that is executed before processing UD data

process_tree(tree)[source]

Process a UD tree

run(document)[source]
udapi.core.block.not_overridden(method)[source]