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

**`class BlacklistFilter(config)`**

Bases: [`Filter`](squirro.lib.nlp.steps.filters.Filter.md#squirro.lib.nlp.steps.filters.Filter)

The blacklist [`Filter`](squirro.lib.nlp.steps.filters.Filter.md#squirro.lib.nlp.steps.filters.Filter) removes a [`Document`](../technical/libnlp/base.md#squirro.lib.nlp.document.Document) or marks a [`Document`](../technical/libnlp/base.md#squirro.lib.nlp.document.Document) to be skip based on a blacklist

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

**Output** - No output specific output format due to removal or marking to skip of the whole [`Document`](../technical/libnlp/base.md#squirro.lib.nlp.document.Document)

Parameters

- `type` ([`str`](https://docs.python.org/3.11/library/stdtypes.html#str)) – blacklist
- `blacklists` ([`dict`](https://docs.python.org/3.11/library/stdtypes.html#dict)) – Dictionary of fields to apply the blacklisting, each with a list of blacklisted values

**Example**

```json
{
    "step": "filter",
    "type": "blacklist",
    "blacklists":{"body":["the","body","blacklist"]}
}
```

Methods SummaryMethods Documentation

**`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)
