words / Polarity
Licence: mit
Detect the polarity (sentiment) of text
Stars: ✭ 33
Programming Languages
javascript
184084 projects - #8 most used programming language
Projects that are alternatives of or similar to Polarity
wink-sentiment
Accurate and fast sentiment scoring of phrases with #hashtags, emoticons :) & emojis 🎉
Stars: ✭ 51 (+54.55%)
Mutual labels: emoji, sentiment
Jeelizweboji
JavaScript/WebGL real-time face tracking and expression detection library. Build your own emoticons animated in real time in the browser! SVG and THREE.js integration demos are provided.
Stars: ✭ 835 (+2430.3%)
Mutual labels: emoji
Awesome Typography
✏︎ Curated list about digital typography 🔥
Stars: ✭ 947 (+2769.7%)
Mutual labels: emoji
Sodieremojikeyboardplus
支持自定义emoji表情,icon font , FontAwesome,斜体,超链接,粗体,下划线,字体,颜色,镂空字体等富文本
Stars: ✭ 14 (-57.58%)
Mutual labels: emoji
Emojione Color Font
End of Life. Switch to https://github.com/eosrei/twemoji-color-font
Stars: ✭ 899 (+2624.24%)
Mutual labels: emoji
Qpdialcodepickerview
International Dial Code Picker View for Country or Area 国家或地区国际区号选择器
Stars: ✭ 15 (-54.55%)
Mutual labels: emoji
Similarity
similarity:相似度计算工具包,java编写。用于词语、短语、句子、词法分析、情感分析、语义分析等相关的相似度计算。
Stars: ✭ 760 (+2203.03%)
Mutual labels: sentiment
Alfred Kaomoji
Alfred workflow to find relevant Kaomoji from text
Stars: ✭ 33 (+0%)
Mutual labels: emoji
Conventional Changelog Angular Emoji
👍 Emoijis for the Angular Commit Guidelines with Emojis
Stars: ✭ 13 (-60.61%)
Mutual labels: emoji
Media Bias
Measures public sentiment on Twitter towards politicians
Stars: ✭ 18 (-45.45%)
Mutual labels: sentiment
D3 Digest
SlackBot that watch channels looking for links and reactions, and generates digests based on those reactions
Stars: ✭ 15 (-54.55%)
Mutual labels: emoji
Manamoji Slack
Slack emojis for Magic card symbols. Used by Scryfall’s Slack bot.
Stars: ✭ 16 (-51.52%)
Mutual labels: emoji
React Rewards
Package containing a few microinteractions you can use to reward your users for little things and make them smile!
Stars: ✭ 841 (+2448.48%)
Mutual labels: emoji
polarity
Detect the polarity of text, based on afinn-165
and
emoji-emotion
.
Install
npm:
npm install polarity
Use
var polarity = require('polarity')
polarity(['some', 'positive', 'happy', 'cats'])
Yields:
{
polarity: 5,
positivity: 5,
negativity: 0,
positive: ['happy', 'positive'],
negative: []
}
polarity(['darn', 'self-deluded', 'abandoned', 'dogs'])
Yields:
{
polarity: -4,
positivity: 0,
negativity: -4,
positive: [],
negative: ['abandoned', 'self-deluded']
}
API
polarity(words[, inject])
Get a polarity result from given values, optionally with one time injections.
polarity does not tokenize values. There are better tokenizers around (parse-latin). However, the following will work pretty good:
function tokenize(value) {
return value.toLowerCase().match(/\S+/g)
}
Parameters
-
words
(Array.<string>
) — Words to parse -
inject
(Object.<number>
, optional) — Custom valences for words
Returns
Object
:
-
polarity
(number
) — Calculated polarity of input -
positivity
(number
) — Total positivity -
negativity
(number
) — Total negativity -
positive
(Array.<string>
) — All positive words -
negative
(Array.<string>
) — All negative words
polarity.inject(words)
Insert custom values.
polarity.polarities
Direct access to the internal values.
Related
-
afinn-96
— AFINN list from 2009, containing 1468 entries -
afinn-111
— AFINN list from 2011, containing 2477 entries -
afinn-165
— AFINN list from 2015, containing 3382 entries -
emoji-emotion
— Like AFINN, but for emoji
License
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].