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

**`class SplitFilter(config)`**

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

The splits `filter` splits the string based field into a list

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

**Output** - the output field is filled with data of type [`list`](https://docs.python.org/3.11/library/stdtypes.html#list) [ [`str`](https://docs.python.org/3.11/library/stdtypes.html#str) ].

Parameters

- `type` ([`str`](https://docs.python.org/3.11/library/stdtypes.html#str)) – split
- `input_field` ([`str`](https://docs.python.org/3.11/library/stdtypes.html#str)) – Field to split
- `output_field` ([`str`](https://docs.python.org/3.11/library/stdtypes.html#str)) – Field to split into
- `delimiter` ([`str`](https://docs.python.org/3.11/library/stdtypes.html#str)`, ``'``,``'`) – Delimiter to split on

**Example**

```json
{
    "step": "filter",
    "type": "split",
    "input_field":"list",
    "output_field":"elements",
}
```

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)
