Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/words/emoji-emotion

List of emoji rated for valence
https://github.com/words/emoji-emotion

emoji emotion polarity unicode valence

Last synced: 27 days ago
JSON representation

List of emoji rated for valence

Awesome Lists containing this project

README

        

# emoji-emotion

[![Build][build-badge]][build]
[![Coverage][coverage-badge]][coverage]
[![Downloads][downloads-badge]][downloads]
[![Size][size-badge]][size]

List of emoji rated for valence.

## Contents

* [What is this?](#what-is-this)
* [When should I use this?](#when-should-i-use-this)
* [Install](#install)
* [Use](#use)
* [API](#api)
* [`emojiEmotion`](#emojiemotion)
* [Data](#data)
* [Support](#support)
* [Types](#types)
* [Compatibility](#compatibility)
* [Related](#related)
* [Contribute](#contribute)
* [Security](#security)
* [License](#license)

## What is this?

This is a list of unicode emoji rated for [valence][valence-wiki] (โ€œgoodnessโ€
vs โ€œbadnessโ€).

## When should I use this?

This package can be used for sentiment analysis of emoji.
You can use [`afinn-165`][afinn-165] for English words.
Use [`gemoji`][gemoji] for more info on emoji.

## Install

This package is [ESM only][esm].
In Node.js (version 14.14+, 16.0+), install with [npm][]:

```sh
npm install emoji-emotion
```

In Deno with [`esm.sh`][esmsh]:

```js
import {emojiEmotion} from 'https://esm.sh/emoji-emotion@3'
```

In browsers with [`esm.sh`][esmsh]:

```html

import {emojiEmotion} from 'https://esm.sh/emoji-emotion@3?bundle'

```

## Use

```js
import {emojiEmotion} from 'emoji-emotion'

console.log(emojiEmotion.slice(0, 5))
```

Yields:

```js
[ { name: '100', emoji: '๐Ÿ’ฏ', polarity: 3 },
{ name: 'angry', emoji: '๐Ÿ˜ ', polarity: -3 },
{ name: 'anguished', emoji: '๐Ÿ˜ง', polarity: -3 },
{ name: 'astonished', emoji: '๐Ÿ˜ฒ', polarity: 2 },
{ name: 'black_heart', emoji: '๐Ÿ–ค', polarity: 3 } ]
```

## API

This package exports the identifier `emojiEmotion`.
There is no default export.

### `emojiEmotion`

List of emoji rated for valence (`Array`).

##### `Info`

Emoji rated for valence.

##### `info.name`

Name of emoji, according to [`gemoji`][gemoji] (`string`).

##### `info.emoji`

Unicode emoji (`string`).

##### `info.polarity`

Integer between minus five (negative) and plus five (positive) (`number`).

## Data

The included emoji are the faces and cats defined by [Unicode][].
The polarity was hand classified (by one person) based on the names of these
emoji (sometimes synonyms) and their [AFINN-165][] values.
Special care was given to **not** classify based on the images (as [different
vendors use different pictograms][checkmoji]), but only on words and how they
are used.

Some emoji receive arguably confusing polarities, such as
`stuck_out_tongue_closed_eyes` (`0`), due to being used for both positive and
negative emotions.

## Support

| Emoji | Name(s) | Polarity |
| - | - | - |
| ๐Ÿ‘ฟ | imp | -4 |
| ๐Ÿ–• | middle\_finger; fu | -4 |
| ๐Ÿ˜พ | pouting\_cat | -4 |
| ๐Ÿ˜ก | rage; pout | -4 |
| ๐Ÿ˜  | angry | -3 |
| ๐Ÿ˜ง | anguished | -3 |
| ๐Ÿ’” | broken\_heart | -3 |
| ๐Ÿ’ฉ | hankey; poop; shit | -3 |
| ๐Ÿ˜ฑ | scream | -3 |
| ๐Ÿ™€ | scream\_cat | -3 |
| ๐Ÿ˜ˆ | smiling\_imp | -3 |
| ๐Ÿ˜ญ | sob | -3 |
| ๐Ÿ˜Ÿ | worried | -3 |
| ๐Ÿ‘Ž | -1; thumbsdown | -2 |
| ๐Ÿ˜ฐ | cold\_sweat | -2 |
| ๐Ÿ˜– | confounded | -2 |
| ๐Ÿ˜• | confused | -2 |
| ๐Ÿ˜ข | cry | -2 |
| ๐Ÿ˜ฟ | crying\_cat\_face | -2 |
| ๐Ÿ˜ž | disappointed | -2 |
| ๐Ÿค• | face\_with\_head\_bandage | -2 |
| ๐Ÿ˜จ | fearful | -2 |
| ๐Ÿ˜ณ | flushed | -2 |
| โ˜น๏ธ | frowning\_face | -2 |
| ๐Ÿ˜ฌ | grimacing | -2 |
| ๐Ÿคฅ | lying\_face | -2 |
| ๐Ÿคข | nauseated\_face | -2 |
| ๐Ÿ˜ฎ | open\_mouth | -2 |
| ๐Ÿ˜ฃ | persevere | -2 |
| ๐Ÿ’€ | skull | -2 |
| โ˜ ๏ธ | skull\_and\_crossbones | -2 |
| ๐Ÿคง | sneezing\_face | -2 |
| ๐Ÿ˜ซ | tired\_face | -2 |
| ๐Ÿ˜’ | unamused | -2 |
| ๐Ÿ˜ฉ | weary | -2 |
| ๐Ÿ˜ฅ | disappointed\_relieved | -1 |
| ๐Ÿ˜ต | dizzy\_face | -1 |
| ๐Ÿค’ | face\_with\_thermometer | -1 |
| ๐Ÿ‘Š | fist\_oncoming; facepunch; punch | -1 |
| ๐Ÿ˜ฆ | frowning | -1 |
| ๐Ÿ‘ป | ghost | -1 |
| ๐Ÿ˜ฏ | hushed | -1 |
| ๐Ÿ˜ท | mask | -1 |
| ๐Ÿค“ | nerd\_face | -1 |
| ๐Ÿ˜” | pensive | -1 |
| ๐Ÿ™„ | roll\_eyes | -1 |
| ๐Ÿ™ | slightly\_frowning\_face | -1 |
| ๐Ÿ˜œ | stuck\_out\_tongue\_winking\_eye | -1 |
| ๐Ÿ˜“ | sweat | -1 |
| ๐Ÿค” | thinking | -1 |
| ๐Ÿค | zipper\_mouth\_face | -1 |
| ๐Ÿคก | clown\_face | 0 |
| ๐Ÿคค | drooling\_face | 0 |
| ๐Ÿ˜‘ | expressionless | 0 |
| ๐Ÿค‘ | money\_mouth\_face | 0 |
| ๐Ÿ˜ | neutral\_face | 0 |
| ๐Ÿ˜ถ | no\_mouth | 0 |
| ๐Ÿ˜ด | sleeping | 0 |
| ๐Ÿ˜ช | sleepy | 0 |
| ๐Ÿ˜ | stuck\_out\_tongue\_closed\_eyes | 0 |
| ๐Ÿ˜ค | triumph | 0 |
| ๐Ÿ™ƒ | upside\_down\_face | 0 |
| ๐Ÿค | handshake | 1 |
| ๐Ÿ˜† | laughing; satisfied | 1 |
| ๐Ÿ™ | pray | 1 |
| ๐Ÿ™‚ | slightly\_smiling\_face | 1 |
| ๐Ÿ˜› | stuck\_out\_tongue | 1 |
| ๐Ÿ˜Ž | sunglasses | 1 |
| ๐Ÿ‘ | +1; thumbsup | 2 |
| ๐Ÿ˜ฒ | astonished | 2 |
| ๐Ÿ˜Š | blush | 2 |
| ๐Ÿค  | cowboy\_hat\_face | 2 |
| ๐Ÿคž | crossed\_fingers | 2 |
| ๐Ÿ˜ | grin | 2 |
| ๐Ÿ˜€ | grinning | 2 |
| ๐Ÿค— | hugs | 2 |
| ๐Ÿ’‹ | kiss | 2 |
| ๐Ÿ˜— | kissing | 2 |
| ๐Ÿ˜ฝ | kissing\_cat | 2 |
| ๐Ÿ˜š | kissing\_closed\_eyes | 2 |
| ๐Ÿ˜™ | kissing\_smiling\_eyes | 2 |
| ๐Ÿ‘„ | lips | 2 |
| ๐Ÿ‘Œ | ok\_hand | 2 |
| โ˜บ๏ธ | relaxed | 2 |
| ๐Ÿ˜Œ | relieved | 2 |
| ๐Ÿ˜„ | smile | 2 |
| ๐Ÿ˜ธ | smile\_cat | 2 |
| ๐Ÿ˜ƒ | smiley | 2 |
| ๐Ÿ˜บ | smiley\_cat | 2 |
| ๐Ÿ˜ | smirk | 2 |
| ๐Ÿ˜ผ | smirk\_cat | 2 |
| ๐Ÿ˜… | sweat\_smile | 2 |
| โœŒ๏ธ | v | 2 |
| ๐Ÿ’ฏ | 100 | 3 |
| ๐Ÿ–ค | black\_heart | 3 |
| ๐Ÿ’™ | blue\_heart | 3 |
| ๐Ÿ‘ | clap | 3 |
| ๐Ÿ’˜ | cupid | 3 |
| ๐Ÿ’ | gift\_heart | 3 |
| ๐Ÿ’š | green\_heart | 3 |
| โค๏ธ | heart | 3 |
| ๐Ÿ˜ | heart\_eyes | 3 |
| ๐Ÿ˜ป | heart\_eyes\_cat | 3 |
| ๐Ÿ’“ | heartbeat | 3 |
| ๐Ÿ’— | heartpulse | 3 |
| ๐Ÿ˜‡ | innocent | 3 |
| ๐Ÿ˜‚ | joy | 3 |
| ๐Ÿ˜น | joy\_cat | 3 |
| ๐Ÿ˜˜ | kissing\_heart | 3 |
| ๐Ÿ’œ | purple\_heart | 3 |
| ๐Ÿ’ž | revolving\_hearts | 3 |
| ๐Ÿ’– | sparkling\_heart | 3 |
| ๐Ÿ’• | two\_hearts | 3 |
| ๐Ÿ˜‰ | wink | 3 |
| ๐Ÿ’› | yellow\_heart | 3 |
| ๐Ÿ˜‹ | yum | 3 |
| ๐Ÿ™Œ | raised\_hands | 4 |
| ๐Ÿคฃ | rofl | 4 |

## Types

This package is fully typed with [TypeScript][].
It exports the additional type `Info`.

## Compatibility

This package is at least compatible with all maintained versions of Node.js.
As of now, that is Node.js 14.14+ and 16.0+.
It also works in Deno and modern browsers.

## Related

* [`afinn-165`][afinn-165]
โ€” list of English words rated for valence
* [`gemoji`][gemoji]
โ€” info on gemoji (GitHub Emoji)

## Contribute

Yes please!
See [How to Contribute to Open Source][contribute].

## Security

This package is safe.

## License

[MIT][license] ยฉ [Titus Wormer][author]

[build-badge]: https://github.com/words/emoji-emotion/workflows/main/badge.svg

[build]: https://github.com/words/emoji-emotion/actions

[coverage-badge]: https://img.shields.io/codecov/c/github/words/emoji-emotion.svg

[coverage]: https://codecov.io/github/words/emoji-emotion

[downloads-badge]: https://img.shields.io/npm/dm/emoji-emotion.svg

[downloads]: https://www.npmjs.com/package/emoji-emotion

[size-badge]: https://img.shields.io/bundlephobia/minzip/emoji-emotion.svg

[size]: https://bundlephobia.com/result?p=emoji-emotion

[npm]: https://docs.npmjs.com/cli/install

[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c

[esmsh]: https://esm.sh

[typescript]: https://www.typescriptlang.org

[contribute]: https://opensource.guide/how-to-contribute/

[license]: license

[author]: https://wooorm.com

[unicode]: http://www.unicode.org/emoji/charts/full-emoji-list.html

[gemoji]: https://github.com/wooorm/gemoji

[afinn-165]: https://github.com/words/afinn-165

[checkmoji]: https://wooorm.com/checkmoji/

[valence-wiki]: https://en.wikipedia.org/wiki/Valence_\(psychology\)