HTMLNormalizer

class squirro.lib.nlp.steps.normalizers.HTMLNormalizer(config)

Bases: squirro.lib.nlp.steps.normalizers.Normalizer

The HTML Normalizer removes HTML markup

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

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

Parameters
  • type (str) – html

  • encoding (str, 'utf-8') –

    Content encoding

    Deprecated since version 3.2.7.

  • remove_tags (list, []) – remove the html tags provided in the list

Example

{
    "step": "normalizer",
    "type": "html",
    "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