You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I install as suggested in your GitHub page (also tested on Google Colab) but there is a problem with the Finnish language
from afinn import Afinn
afinn = Afinn(language = 'fi')
afinn.score('Siellä on uusi hyvä juttu, katsokaa ja kuunnelkaa ihmeessä.')
Here is the results
KeyError Traceback (most recent call last)
Input In [11], in <cell line: 2>()
1 from afinn import Afinn
----> 2 afinn = Afinn(language = 'fi')
3 afinn.score('Siellä on uusi hyvä juttu, katsokaa ja kuunnelkaa ihmeessä.')
File ~/opt/anaconda3/lib/python3.9/site-packages/afinn/afinn.py:72, in Afinn.init(self, language, emoticons, word_boundary)
57 def init(self, language="en", emoticons=False, word_boundary=True):
58 """Setup dictionary from data file.
59
60 The language parameter can be set to English (en) or Danish (da).
(...)
70
71 """
---> 72 filename = LANGUAGE_TO_FILENAME[language]
73 full_filename = self.full_filename(filename)
74 if emoticons:
75 # Words
KeyError: 'fi'
The text was updated successfully, but these errors were encountered:
The PyPI package is not updated to Finish (I ought to do that). In the mean time: The GitHub version can be clone or installed and has the Finish support.
I install as suggested in your GitHub page (also tested on Google Colab) but there is a problem with the Finnish language
from afinn import Afinn
afinn = Afinn(language = 'fi')
afinn.score('Siellä on uusi hyvä juttu, katsokaa ja kuunnelkaa ihmeessä.')
Here is the results
KeyError Traceback (most recent call last)
Input In [11], in <cell line: 2>()
1 from afinn import Afinn
----> 2 afinn = Afinn(language = 'fi')
3 afinn.score('Siellä on uusi hyvä juttu, katsokaa ja kuunnelkaa ihmeessä.')
File ~/opt/anaconda3/lib/python3.9/site-packages/afinn/afinn.py:72, in Afinn.init(self, language, emoticons, word_boundary)
57 def init(self, language="en", emoticons=False, word_boundary=True):
58 """Setup dictionary from data file.
59
60 The language parameter can be set to English (en) or Danish (da).
(...)
70
71 """
---> 72 filename = LANGUAGE_TO_FILENAME[language]
73 full_filename = self.full_filename(filename)
74 if emoticons:
75 # Words
KeyError: 'fi'
The text was updated successfully, but these errors were encountered: