kazu.steps.linking.post_processing.mapping_step

Classes

MappingStep

A wrapper for StrategyRunner, so it can be used in a pipeline.

class kazu.steps.linking.post_processing.mapping_step.MappingStep[source]

Bases: ParserDependentStep

A wrapper for StrategyRunner, so it can be used in a pipeline.

__call__(doc)[source]

Process documents and respond with processed and failed documents.

Note that many steps will be decorated by document_iterating_step() or document_batch_step() which will modify the ‘original’ __call__ function signature to match the expected signature for a step, as the decorators handle the exception/failed documents logic for you.

Parameters:
Returns:

The first element is all the provided docs (now modified by the processing), the second is the docs that failed to (fully) process correctly.

Return type:

tuple[list[Document], list[Document]]

__init__(parsers, strategy_runner)[source]
Parameters: