# SpacyTextSplitter

> **Class** in `langchain_text_splitters`

📖 [View in docs](https://reference.langchain.com/python/langchain-text-splitters/spacy/SpacyTextSplitter)

Splitting text using Spacy package.

Per default, Spacy's `en_core_web_sm` model is used and
its default max_length is 1000000 (it is the length of maximum character
this model takes which can be increased for large files). For a faster, but
potentially less accurate splitting, you can use `pipeline='sentencizer'`.

## Signature

```python
SpacyTextSplitter(
    self,
    separator: str = '\n\n',
    pipeline: str = 'en_core_web_sm',
    max_length: int = 1000000,
    *,
    strip_whitespace: bool = True,
    **kwargs: Any = {},
)
```

## Extends

- `TextSplitter`

## Constructors

```python
__init__(
    self,
    separator: str = '\n\n',
    pipeline: str = 'en_core_web_sm',
    max_length: int = 1000000,
    *,
    strip_whitespace: bool = True,
    **kwargs: Any = {},
) -> None
```

| Name | Type |
|------|------|
| `separator` | `str` |
| `pipeline` | `str` |
| `max_length` | `int` |
| `strip_whitespace` | `bool` |


## Methods

- [`split_text()`](https://reference.langchain.com/python/langchain-text-splitters/spacy/SpacyTextSplitter/split_text)

---

[View source on GitHub](https://github.com/langchain-ai/langchain/blob/8fec4e7ceee2c368b068c49f9fed453276e210e7/libs/text-splitters/langchain_text_splitters/spacy.py#L26)