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

**`class EmptyFilter(config)`**

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

The empty [`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 skip based on empty fields

**Input** - No specific input type necessary as long as it returns True/False for `if not field_name`.

**Output** - No 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)) – empty
- `field` ([`str`](https://docs.python.org/3.11/library/stdtypes.html#str)`, ``None`) – Field to filter, this option is here to support older scripts, as removing it would break them
- `fields` ([`list`](https://docs.python.org/3.11/library/stdtypes.html#list)`, ``None`) – Fields to filter
- `replacement_value` ([`object`](https://docs.python.org/3.11/library/functions.html#object)`, ``None`) – Value with which to replace an empty field
- `skip` ([`bool`](https://docs.python.org/3.11/library/functions.html#bool)`, ``True`) – Whether or not to skip a doc with an empty field

**Example**

```json
{
    "step": "filter",
    "type": "empty",
    "fields":["body"]
}
```

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)
