<!-- Source: https://docs.squirro.com/en/latest/api/squirro.lib.nlp.steps.normalizers.StopwordsNormalizer.html -->
# StopwordsNormalizer

**`class StopwordsNormalizer(config)`**

Bases: [`Normalizer`](squirro.lib.nlp.steps.normalizers.Normalizer.md#squirro.lib.nlp.steps.normalizers.Normalizer)

The stopwords [`Normalizer`](squirro.lib.nlp.steps.normalizers.Normalizer.md#squirro.lib.nlp.steps.normalizers.Normalizer) strips stopwords from the text

**Input** - all input fields need to be of type [`str`](https://docs.python.org/3.11/library/stdtypes.html#str).

**Output** - all output fields are filled with data of type [`str`](https://docs.python.org/3.11/library/stdtypes.html#str).

Parameters

- `type` ([`str`](https://docs.python.org/3.11/library/stdtypes.html#str)) – stopwords
- `stopwords` ([`list`](https://docs.python.org/3.11/library/stdtypes.html#list)`, ``[``]`) – List of stopwords
- `stopwords_file` ([`str`](https://docs.python.org/3.11/library/stdtypes.html#str)`, ``None`) – Path to the file with list of stopwords

**Example**

```json
{
    "step": "normalizer",
    "type": "stopwords",
    "input_fields": ["body"],
    "output_fields": ["normalized_body"],
    "stopwords": ["the","stopwords"]
}
```

Methods SummaryMethods Documentation

**`load()`**

Load a step

**`process_doc(doc)`**

Process a document

Parameters

`doc` ([`Document`](../technical/libnlp/base.md#squirro.lib.nlp.document.Document)) – Document

Returns

Processed document

Return type

[Document](../technical/libnlp/base.md#squirro.lib.nlp.document.Document)

**`save()`**

Save a step
