fnielsen / afinn Goto Github PK
View Code? Open in Web Editor NEWAFINN sentiment analysis in Python
License: Apache License 2.0
AFINN sentiment analysis in Python
License: Apache License 2.0
Hi there,
I see some awesome work in #6 and am wondering if you are interested in having more elaborate emoij support, potentially using http://kt.ijs.si/data/Emoji_sentiment_ranking as input.
Is this something you have looked at before and / or are interested in?
Cheers,
Otto
The commit by @mopinion contains some strange things: For instance "HÄNFÖRA 3" and English "Fed up -3". This should be looked over and possibly fixed.
I've this huge string with tons of sentences and it returns "Neutral" for all of them, I assume it has some character limit, what is it? so that i can break my full string into smaller sentences to parse into Affin and get accurate score?
Extend the AFINN dictionary in afinn to include user defined words, see "Is it possible to extend the AFINN dictionary in afinn?" at https://github.com/fnielsen/afinn/wiki/FAQ
Link to AffectiveTweets Weka https://github.com/felipebravom/AffectiveTweets/
Hi,
The repo shows the LICENSE change from GPL to Apache-2.0 but not reflected in python library. Dies it still have GPL License?
https://github.com/fnielsen/afinn/actions/runs/2091000738
Python3.5 seems no longer to be available: "Version 3.5 with arch x64 not found Available versions: 2.7.18 (x64) 3.10.4 (x64) 3.6.15 (x64) 3.7.12 (x64) 3.8.12 (x64) 3.9.12 (x64)"
Enable specification of filename to choose between version and user-provided modifications are word list.
Upper case letters in emoticons does not work at the moment. An example is :D
Would it be possible to expand to use double-languages - for example selecting danish and english, and then analysing sentiments from both lists?
Installing afinn using pip3 and run my code. And got this error:
Traceback (most recent call last):
File "afinnsentturkish.py", line 6, in <module>
afn = Afinn(language='tr')
File "/Users/darmawan/Library/Python/3.8/lib/python/site-packages/afinn/afinn.py", line 72, in __init__
filename = LANGUAGE_TO_FILENAME[language]
KeyError: 'tr'
In code I'm using this:
#instantiate afinn
afn = Afinn(language='tr')
Standard distribution may not have Python 2.6, 3.3 and 3.4 and it seems to be unavailable via deadsnakes
There is a warning from setup tools about dashes in setup.cfg. They should be underscores. It concerts "description-file".
Hi!
Do you plan to release new version of package (which includes French and Swedish languages) for PyPI?
The word "ominous" has a score of 3, indicating that it has positive sentiment.
https://github.com/fnielsen/afinn/search?q=ominous&type=Code
This seems counterintuitive to me. By comparison, the Bing lexicon considers it to be a negative word, and the NRC lexicon associates it with "anticipation", "fear', and "negative" sentiments.
Is there a possibility that the score for "ominous" is incorrect?
https://travis-ci.org/fnielsen/afinn/builds/476735862
The line should be prefixed with an r
.
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 version information is present in the setup.py
and need to be set manually.
test.py is in the main directory
Just thought it would be polite to let you know I wrote a little Perl 6 module wrapping your data. Available here https://github.com/MattOates/Text--Emotion
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.