Code Monkey home page Code Monkey logo

cl-sentiment's Introduction

cl-sentiment

cl-sentiment is a Common Lisp library that uses the AFINN-111 word list to perform sentiment analysis on arbitrary text.

Inspired by https://github.com/thisandagain/sentiment, it's particularly suited to looking at Twitter tweets.

The AFINN word list is by Finn Arup Nielsen available from http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6010

You might also like to read his paper:

"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. http://arxiv.org/abs/1103.2903

The AFINN files are copyright protected and distributed under the terms of the Open Database License (ODbL) v1.0, http://www.opendatacommons.org/licenses/odbl/1.0/

cl-sentiment is now available via Quicklisp.

Use initialize to initialize cl-sentiment with the default sentiment word scores.

Call sentiment with some arbitrary text and it returns two values - the sentiment score and the comparative sentiment score. Positive values convey positive sentiment; negative values convey negative sentiment.

Example

CL-USER> (ql:quickload "cl-sentiment")
...
CL-USER> (cl-sentiment:initialize)
#<HASH-TABLE :TEST EQUAL :COUNT 2477 {1003A54463}>
CL-USER> (cl-sentiment:sentiment "Cats are totally amazing!")
4
1
CL-USER> 

Rob Blackwell

December 2012

cl-sentiment's People

Watchers

Daniel Drzimotta avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.