mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-28 10:56:31 +03:00
1.3 KiB
1.3 KiB
title | tag | source | new |
---|---|---|---|
SentenceRecognizer | class | spacy/pipeline/pipes.pyx | 3 |
A trainable pipeline component for sentence segmentation. For a simpler,
ruse-based strategy, see the Sentencizer
. This class is a
subclass of Pipe
and follows the same API. The component is also available via
the string name "senter"
. After initialization, it is typically added to the
processing pipeline using nlp.add_pipe
.
Default config
This is the default configuration used to initialize the model powering the pipeline component. See the model 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 docs.
https://github.com/explosion/spaCy/blob/develop/spacy/pipeline/defaults/senter_defaults.cfg
SentenceRecognizer.__init__
Initialize the sentence recognizer.
Example
# Construction via create_pipe senter = nlp.create_pipe("senter") # Construction from class from spacy.pipeline import SentenceRecognizer senter = SentenceRecognizer()