cadmium_sentiment
Version, currently master branch1 version
- master branchlatestApr 18, 2020
github.com/cadmiumcr/sentiment
No description declared in shard.yml.
1 stars
0 dependents
License: MIT
Installation
# Add this to your shard.yml
dependencies:
cadmium_sentiment:
github: cadmiumcr/sentiment
branch: mastermaster is a branch, not a release, so this tracks it rather than pinning a version.
Then run:
shards installshard.yml
- Crystal
0.30.1- License
- MIT
- Author
- Chris Watson
Dependencies
Runtime Dependencies
- cadmium_util*github: cadmiumcr/utilities
- cadmium_tokenizer*github: cadmiumcr/tokenizer
Development Dependencies
- ameba0.10.0github: veelenga/amebadev
README
Sentiment analysis
The Sentiment module uses the AFINN-165 wordlist and Emoji Sentiment Ranking to provide sentiment analysis on arbitrary blocks of text.
Installation
-
Add the dependency to your
shard.yml:dependencies: sentiment: github: cadmiumcr/sentiment -
Run
shards install
Usage
require "cadmium_sentiment"
sentiment = Cadmium.sentiment
"Crystal is seriously the best programming language.".sentiment
# or
sentiment.analyze("Crystal is seriously the best programming language.")
# => {
score: 3,
comparative: 0,
tokens: ["Crystal", "is", "seriously", "the", "best", "programming", "language"],
words: ["best"],
positive: ["best"],
negative: []
}
"I really hate Python".is_negative?
# => true
"I really ๐ Crystal. It's my favorite.".is_positive?
# => true
Contributing
- Fork it (https://github.com/cadmiumcr/sentiment/fork)
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request
Contributors
- Chris Watson - creator and maintainer
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This branch
- Branch
master- Seen
- Apr 18, 2020
- Crystal
0.30.1- Indexed
- yes
Dependents
No indexed shard depends on this one yet.
Repository
github.com/cadmiumcr/sentiment
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 15, 2026
- Synced
- Aug 15, 2026
- Versions
- 1