nidaba.tasks package

Submodules

nidaba.tasks.binarize module

nidaba.tasks.binarize

Tasks for segmentation of color images into binary images. More often than not these will operate on grayscale input.

nidaba.tasks.helper module

nidaba.tasks.helper

A helper class that all nidaba tasks should inherit from to ensure accurate logging of errors.

class nidaba.tasks.helper.NidabaTask

Bases: celery.app.task.Task

An abstract class propagating unused function arguments through the execution chain. This means that no task should accept arbitrary (**kwargs) arguments as they won’t be forwarded to the actual function and will be retained through the whole chain.

acks_late = True
arg_values = {}
get_valid_args()

nidaba.tasks.img module

nidaba.tasks.img

Some general image processing tasks that are outside the scope of more specific packages (e.g. binarization).

nidaba.tasks.output module

nidaba.tasks.output

Various tasks implementing common housekeeping processes like format conversion, metadata enrichment, ...

nidaba.tasks.postprocessing module

nidaba.tasks.postprocessing

Various postprocessing tasks that operate upon recognized texts.

nidaba.tasks.stats module

nidaba.tasks.stats

Various tasks calculating metrics on documents.

nidaba.tasks.stats.cleanup(text)

Removes lines containing only whitespace and normalizes to NFD.

nidaba.tasks.stats.find_matching(doc, ground_truths)

Extracts a probable ground truth from a list of files based on prefix match.

nidaba.tasks.util module

nidaba.tasks.util

Various utility tasks that either can’t be classified by purpose or are one of a kind.

Module contents

nidaba.tasks

The tasks package contains all built-in celery tasks used by nidaba. Tasks should not contain any actual implementations but import them as separate packages and just shim around them doing some initial setup, most commonly conversion between storage module tuples and absolute paths.

Additional tasks depending on external or complex dependencies are contained in plugins found in the plugins directory.