{ "info": { "author": "Finn Aarup Nielsen", "author_email": "faan@dtu.dk", "bugtrack_url": null, "classifiers": [ "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5" ], "description": "afinn\n=====\n\nAFINN sentiment analysis in Python: Wordlist-based approach for sentiment analysis.\n\nExamples\n--------\n\n >>> from afinn import Afinn\n >>> afinn = Afinn()\n >>> afinn.score('This is utterly excellent!')\n 3.0\n \nIn Danish:\n\n >>> afinn = Afinn(language='da')\n >>> afinn.score('Hvis ikke det er det mest afskyelige flueknepperi...')\n -6.0\n \nWith emoticons:\n\n >>> afinn = Afinn(emoticons=True)\n >>> afinn.score('I saw that yesterday :)')\n 2.0\n\nWith multiple sentences (here with data from an Austen novel available in Gutenberg):\n\n >>> from afinn import Afinn\n >>> from nltk.corpus import gutenberg\n >>> import textwrap\n >>> afinn = Afinn()\n >>> sentences = (\" \".join(wordlist) for wordlist in gutenberg.sents('austen-sense.txt'))\n >>> scored_sentences = ((afinn.score(sent), sent) for sent in sentences)\n >>> sorted_sentences = sorted(scored_sentences)\n >>> print(\"\\n\".join(textwrap.wrap(sorted_sentences[0][1], 70)))\n To attach myself to your sister , therefore , was not a thing to be\n thought of ;-- and with a meanness , selfishness , cruelty -- which no\n indignant , no contemptuous look , even of yours , Miss Dashwood , can\n ever reprobate too much -- I was acting in this manner , trying to\n engage her regard , without a thought of returning it .-- But one\n thing may be said for me : even in that horrid state of selfish vanity\n , I did not know the extent of the injury I meditated , because I did\n not THEN know what it was to love .\n\nCitation\n--------\nIf you as a scientist use the wordlist or the code please cite this one: \n\n* Finn \u00c5rup 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. Volume 718 in CEUR Workshop Proceedings: 93-98. 2011 May. Matthew Rowe, Milan Stankovic, Aba-Sah Dadzie, Mariann Hardey (editors)\n\nPaper with supplement: http://www2.imm.dtu.dk/pubdb/views/edoc_download.php/6006/pdf/imm6006.pdf\n\nSee also\n--------\n* http://neuro.compute.dtu.dk/wiki/AFINN - Brede Wiki entry on AFINN with pointers to many scientific papers\n* https://github.com/darenr/afinn - Sentiment analysis in Javascript with AFINN word list\n\n\nTravis et al.\n-------------\n\n.. image:: https://travis-ci.org/fnielsen/afinn.svg?branch=master\n :target: https://travis-ci.org/fnielsen/afinn\n\n.. image:: https://coveralls.io/repos/fnielsen/afinn/badge.svg?branch=master :target: https://coveralls.io/github/fnielsen/afinn?branch=master \n\n.. image:: https://www.quantifiedcode.com/api/v1/project/0bcc1cd5b8f54a0fbd2f2e6f226cfa4f/badge.svg\n :target: https://www.quantifiedcode.com/app/project/0bcc1cd5b8f54a0fbd2f2e6f226cfa4f\n :alt: Code issues\n\n.. image:: https://img.shields.io/pypi/dm/afinn.svg?style=flat\n :target: https://pypi.python.org/pypi/afinn\n :alt: Downloads\n\n.. image:: https://www.openhub.net/p/afinn/widgets/project_thin_badge.gif\n :target: https://www.openhub.net/p/afinn\n :alt: Open Hub\n", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/fnielsen/afinn", "keywords": "sentiment analysis", "license": "GPL", "maintainer": null, "maintainer_email": null, "name": "afinn", "package_url": "https://pypi.org/project/afinn/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/afinn/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/fnielsen/afinn" }, "release_url": "https://pypi.org/project/afinn/0.1/", "requires_dist": null, "requires_python": null, "summary": "AFINN sentiment analysis", "version": "0.1" }, "last_serial": 2440812, "releases": { "0.0.1rc1": [ { "comment_text": "", "digests": { "md5": "e2cf286710da7640213fe89eee6e8dd3", "sha256": "74ce9b732c6f68ec5da79f960f10b7034e4ff06893cb5775a4028bffc375f50c" }, "downloads": -1, "filename": "afinn-0.0.1rc1.tar.gz", "has_sig": false, "md5_digest": "e2cf286710da7640213fe89eee6e8dd3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 51262, "upload_time": "2015-10-28T15:56:46", "url": "https://files.pythonhosted.org/packages/35/a8/5463d9c01b63841c13782624b7abe916d36753eecc8cf15eec5a359e26e4/afinn-0.0.1rc1.tar.gz" } ], "0.1": [ { "comment_text": "", "digests": { "md5": "1017ee51c918a45461454b42c62fd722", "sha256": "cf2f728ccc6f2974f2f27e2110e4c05a0133a2f14a40387c463a8c9fdd4ab61b" }, "downloads": -1, "filename": "afinn-0.1.tar.gz", "has_sig": false, "md5_digest": "1017ee51c918a45461454b42c62fd722", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 52591, "upload_time": "2016-11-03T19:13:05", "url": "https://files.pythonhosted.org/packages/86/e5/ffbb7ee3cca21ac6d310ac01944fb163c20030b45bda25421d725d8a859a/afinn-0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "1017ee51c918a45461454b42c62fd722", "sha256": "cf2f728ccc6f2974f2f27e2110e4c05a0133a2f14a40387c463a8c9fdd4ab61b" }, "downloads": -1, "filename": "afinn-0.1.tar.gz", "has_sig": false, "md5_digest": "1017ee51c918a45461454b42c62fd722", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 52591, "upload_time": "2016-11-03T19:13:05", "url": "https://files.pythonhosted.org/packages/86/e5/ffbb7ee3cca21ac6d310ac01944fb163c20030b45bda25421d725d8a859a/afinn-0.1.tar.gz" } ] }