skillner.core.Pipeline#

class skillner.core.Pipeline[source]#

Pipeline class to define the way of enriching documents.

The pipeline defines sequential way of enriching documents.

Attributes:
dict_nodes: Dict[str, Node]

A dictionary that stores the enrichers (nodes) and their corresponding names.

__init__() None[source]#

Methods

__init__()

add_node(enricher, name)

Append enricher to the pipeline.

run(doc)

Run the pipeline on document.

add_node(enricher: Node, name: str) None[source]#

Append enricher to the pipeline.

enricher: instance of Node

Enricher to be called on the document when pipeline is run.

name: str

Name enricher to identify it among the other enrichers.

run(doc: Document) None[source]#

Run the pipeline on document.

Pipeline will call sequentially enricher on the document.

doc: instance of Document

Document to enrich.