mirror of
https://github.com/Steffo99/unimore-bda-6.git
synced 2024-11-25 01:04:19 +00:00
Completely remove language
parameter from VanillaSA
This commit is contained in:
parent
c212be37c3
commit
a34baebeb5
1 changed files with 2 additions and 2 deletions
|
@ -22,11 +22,11 @@ class VanillaSA(BaseSA, metaclass=abc.ABCMeta):
|
|||
super().__init__()
|
||||
self.model: nltk.sentiment.SentimentAnalyzer = nltk.sentiment.SentimentAnalyzer()
|
||||
|
||||
def _tokenize_text(self, text: str, language: str = "english") -> list[str]:
|
||||
def _tokenize_text(self, text: str) -> list[str]:
|
||||
"""
|
||||
Convert a text string into a list of tokens, using the language of the model.
|
||||
"""
|
||||
tokens = nltk.word_tokenize(text, language=language)
|
||||
tokens = nltk.word_tokenize(text)
|
||||
nltk.sentiment.util.mark_negation(tokens, shallow=True)
|
||||
return tokens
|
||||
|
||||
|
|
Loading…
Reference in a new issue