Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

AFINN sentiment analysis in Python: Wordlist-based approach for sentiment analysis.

Examples

>>> from afinn import Afinn
>>> afinn = Afinn()
>>> afinn.score('This is utterly excellent!')
3.0

In Danish:

>>> afinn = Afinn(language='da')
>>> afinn.score('Hvis ikke det er det mest afskyelige flueknepperi...')
-6.0

With emoticons:

>>> afinn = Afinn(emoticons=True)
>>> afinn.score('I saw that yesterday :)')
2.0

Citation

If you as a scientist use the wordlist or the code please cite this one:

  • Finn Årup Nielsen, “A new ANEW: evaluation of a word list for sentiment analysis in microblogs” , Proceedings of the ESWC2011 Workshop on ‘Making Sense of Microposts’: Big things come in small packages 718 in CEUR Workshop Proceedings: 93-98. 2011 May. Matthew Rowe, Milan Stankovic, Aba-Sah Dadzie, Mariann Hardey (editors)

Paper with supplement: http://www2.imm.dtu.dk/pubdb/views/edoc_download.php/6006/pdf/imm6006.pdf

See also

Travis tests

https://travis-ci.org/fnielsen/afinn.svg?branch=master

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

afinn-0.0.1rc1.tar.gz (51.3 kB view details)

Uploaded Source

File details

Details for the file afinn-0.0.1rc1.tar.gz.

File metadata

  • Download URL: afinn-0.0.1rc1.tar.gz
  • Upload date:
  • Size: 51.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for afinn-0.0.1rc1.tar.gz
Algorithm Hash digest
SHA256 74ce9b732c6f68ec5da79f960f10b7034e4ff06893cb5775a4028bffc375f50c
MD5 e2cf286710da7640213fe89eee6e8dd3
BLAKE2b-256 35a85463d9c01b63841c13782624b7abe916d36753eecc8cf15eec5a359e26e4

See more details on using hashes here.

Release history Release notifications | RSS feed

0.1

1 file

This release

0.0.1rc1 This release

1 file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page