Skip to content

Commit

Permalink
Handle attributes as normal class comments
Browse files Browse the repository at this point in the history
  • Loading branch information
alanakbik committed Dec 4, 2024
1 parent fd9ef76 commit 057ea2e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions flair/splitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]:
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 057ea2e

Please sign in to comment.