https://github.com/kupolak/afinn
Sentiment analysis in Elixir.
https://github.com/kupolak/afinn
afinn english sentiment sentiment-analysis sentiment-classification sentimental-analysis text-classification text-mining
Last synced: 30 days ago
JSON representation
Sentiment analysis in Elixir.
- Host: GitHub
- URL: https://github.com/kupolak/afinn
- Owner: kupolak
- License: mit
- Created: 2023-01-22T20:14:25.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2024-06-03T15:38:00.000Z (11 months ago)
- Last Synced: 2025-03-19T05:33:17.733Z (about 1 month ago)
- Topics: afinn, english, sentiment, sentiment-analysis, sentiment-classification, sentimental-analysis, text-classification, text-mining
- Language: Elixir
- Homepage:
- Size: 43.9 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Afinn
Sentiment analysis in Elixir.
The library is highly influenced by other `afinn` implementations.Dictionaries included:
* English Language 🇬🇧
* Danish Language 🇩🇰## Table of contents
- [Installation](#installation)
- [Usage](#usage)
- [Dictionaries](#dictionaries)
- [Similar libraries in other programming languages](#similar-libraries-in-other-programming-languages)
- [Documentation](#documentation)
- [Contributing](#contributing)## Installation
The package can be installed
by adding `afinn` to your list of dependencies in `mix.exs`:```elixir
def deps do
[
{:afinn, "~> 0.2.1"}
]
end
```## Usage
The following languages are currently supported:| Language | Symbol |
|----------|--------|
| English | :en |
| Danish | :dk |```elixir
text = 'I love this!'Afinn.score(text, :en)
#=> 3Afinn.score_to_words(text, :en)
#=> :positiveAfinn.score("DÃ¥rligt produkt!", :dk)
#=> -3
```## Dictionaries
The dictionaries used in this repository are from a project by Finn Ã…rup Nielsen:
https://github.com/fnielsen/afinn/tree/master/afinn/dataFor more information visit:
http://corpustext.com/reference/sentiment_afinn.htmlPaper with supplement: http://www2.imm.dtu.dk/pubdb/views/edoc_download.php/6006/pdf/imm6006.pdf
## Similar libraries in other programming languages
* https://github.com/fnielsen/afinn - Sentiment analysis in Python with AFINN word list
* https://github.com/darenr/afinn - Sentiment analysis in Javascript with AFINN word list
* https://github.com/prograils/afinn - Sentiment analysis in Ruby with AFINN word list## Documentation
Documentation can be generated with [ExDoc](https://github.com/elixir-lang/ex_doc)
and published on [HexDocs](https://hexdocs.pm). Once published, the docs can
be found at [https://hexdocs.pm/afinn](https://hexdocs.pm/afinn).## Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/kupolak/afinn.