Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/markwoodhall/clj-subjectivity
Clojure library based on Subjectivity Lexicon from http://mpqa.cs.pitt.edu/
https://github.com/markwoodhall/clj-subjectivity
Last synced: 14 days ago
JSON representation
Clojure library based on Subjectivity Lexicon from http://mpqa.cs.pitt.edu/
- Host: GitHub
- URL: https://github.com/markwoodhall/clj-subjectivity
- Owner: markwoodhall
- License: mit
- Created: 2016-08-13T19:20:51.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-09-19T20:07:31.000Z (over 8 years ago)
- Last Synced: 2024-11-30T02:48:55.569Z (22 days ago)
- Language: Clojure
- Size: 104 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# clj-subjectivity
A Clojure wrapper around a subjectivity lexicon [from here](http://mpqa.cs.pitt.edu/)
- [API Docs](http://markwoodhall.github.io/clj-subjectivity)
## Status
[![Build Status](https://api.travis-ci.org/markwoodhall/clj-subjectivity.svg?branch=master)](https://api.travis-ci.org/repositories/markwoodhall/clj-subjectivity)
## Usage
Pass a sequence of words to the `sentiment` function like so:
```clojure
(sentiment ["fire"])
```This will return a map similar to:
```clojure
{:difference -0.5,
:negative 0.5,
:neutral 0,
:positive 0,
:top-negative '("fire"),
:top-neutral '(),
:top-positive '()
:bottom-negative '("fire")
:bottom-neutral '()
:bottom-positive '()}
````positive`, `negative`, and `neutral` are counts of the respective word types.
`difference` is the `positive` count minus the `negative` count.
`top-nagative`, `top-positive`, and `top-neutral` are the most frequently occuring words for the respective word type.
`bottom-nagative`, `bottom--positive`, and `bottom-neutral` are the least frequently occuring words for the respective word type.## License
Copyright © 2016 Mark Woodhall
Released under the MIT License: http://www.opensource.org/licenses/mit-license.php