From 057ea2e37a4dce9ba279a78183f22f125f0d84b6 Mon Sep 17 00:00:00 2001 From: Alan Akbik Date: Wed, 4 Dec 2024 12:47:52 +0100 Subject: [PATCH] Handle attributes as normal class comments --- flair/splitter.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/flair/splitter.py b/flair/splitter.py index 9cc7a2e91..6246969f2 100644 --- a/flair/splitter.py +++ b/flair/splitter.py @@ -25,10 +25,6 @@ class SentenceSplitter(ABC): the sentence splitter's configuration. The most common class in Flair that implements this base class is :class:`SegtokSentenceSplitter`. - - Attributes: - name (str): A string identifier of the sentence splitter. - tokenizer: The :class:`flair.tokenization.Tokenizer` class used to tokenize sentences after they are split. """ def split(self, text: str, link_sentences: bool = True) -> list[Sentence]: @@ -61,10 +57,12 @@ def _perform_split(self, text: str) -> list[Sentence]: @property def name(self) -> str: + """A string identifier of the sentence splitter.""" return self.__class__.__name__ @property def tokenizer(self) -> Tokenizer: + """The :class:`flair.tokenization.Tokenizer` class used to tokenize sentences after they are split.""" raise NotImplementedError @tokenizer.setter