PunctuationNormalizer#

class PunctuationNormalizer(config)#

Bases: Normalizer

The punctuation Normalizer strips punctuation from text

Input - all input fields need to be of type str.

Output - all output fields are filled with data of type str.

Parameters:

type (str) – punctuation

Example

{
    "step": "normalizer",
    "type": "punctuation",
    "input_fields": ["body"],
    "output_fields": ["normalized_body"]
}

Methods Summary

process_doc(doc)

Process a document

Methods Documentation

process_doc(doc)#

Process a document

Parameters:

doc (Document) – Document

Returns:

Processed document

Return type:

Document