spaCy/website/docs/api/sentencerecognizer.md

36 lines
1.0 KiB
Markdown
Raw Normal View History

2020-07-04 15:23:10 +03:00
---
title: SentenceRecognizer
tag: class
2020-07-27 01:29:45 +03:00
source: spacy/pipeline/senter.pyx
2020-07-04 15:23:10 +03:00
new: 3
---
A trainable pipeline component for sentence segmentation. For a simpler,
ruse-based strategy, see the [`Sentencizer`](/api/sentencizer). This class is a
subclass of `Pipe` and follows the same API. The component is also available via
2020-07-27 01:29:45 +03:00
the string name `"senter"`.
2020-07-04 15:23:10 +03:00
2020-07-27 01:29:45 +03:00
## Implementation and defaults {#implementation}
2020-07-08 14:34:35 +03:00
2020-07-27 01:29:45 +03:00
See the [model architectures](/api/architectures) documentation for details on
the architectures and their arguments and hyperparameters. To learn more about
how to customize the config and train custom models, check out the
[training config](/usage/training#config) docs.
2020-07-08 14:34:35 +03:00
```python
2020-07-27 01:29:45 +03:00
https://github.com/explosion/spaCy/blob/develop/spacy/pipeline/senter.pyx
2020-07-08 14:34:35 +03:00
```
2020-07-04 15:23:10 +03:00
## SentenceRecognizer.\_\_init\_\_ {#init tag="method"}
Initialize the sentence recognizer.
> #### Example
>
> ```python
2020-07-27 01:29:45 +03:00
> # Construction via add_pipe
> senter = nlp.add_pipe("senter")
2020-07-04 15:23:10 +03:00
> ```
<!-- TODO: document, similar to other trainable pipeline components -->