skillner.word_processing.WordProcessor#

class skillner.word_processing.WordProcessor(dict_filters: Dict[str, Callable[[Word], str]])[source]#

Word processor class that runs functions on all words of document.

WordProcessor class acts on individual words of document. It runs independently functions and stores the result on the metadata dictionary of word.

Parameters:
dict_filters: Dict[str, Callable[[Word], str]]

A dictionary of functions that take Word as input and returns a string.

__init__(dict_filters: Dict[str, Callable[[Word], str]]) None[source]#

Methods

__init__(dict_filters)

enrich_doc(doc)

Enrich every word of doc.

enrich_doc(doc: Document) None[source]#

Enrich every word of doc.

Parameters:
doc: Document

The document with words to be enriched.