emojinator

1.0.2 • Public • Published

Emojinator

npm version npm download Build Status Coverage Status bitHound Dev Dependencies bitHound Code

A module to extract emoji as data for data analyze.

Introduction

One of the problems during sentiment analyze on text is some text symbols like emojis. This library could make more than only remove emojis from the text, it could ma and replace emojis for your descriptions. It could be useful for people that want to use emojis data like a feature in your IA.

Quick Start

Installing using NPM: npm install emojinator

    const emojinator = require('emojinator');
    const phrase = 'I love gym 💪💙';
 
    // Will put a description in place of emojis
    // 'I love gym <flexed-biceps><blue-heart>'
    emojinator.changeEmojiForDesc(phrase)
 
    // Will extract all emojis from phrase
    // 'I love gym'
    emojinator.extractEmoji(phrase)
 
    // Will get all emoji descriptions (if emoji appears more time will appear more than once)
    // ['flexed-biceps', 'blue-heart']
    emojinator.getEmojis(phrase)
 
    /**
        Will return a object with all other main functions executed
        {
            rawText: 'I love gym 💪💙',
            preClear: 'I love gym <flexed-biceps><blue-heart>',
            clearText: 'I love gym',
            emojis: ['flexed-biceps', 'blue-heart'],
        }
    **/
    emojinator.fullObject(phrase)

Contribuiting

Feel free to open issues, and pull request to help us improve this library :)

Dependencies (0)

    Dev Dependencies (5)

    Package Sidebar

    Install

    npm i emojinator

    Weekly Downloads

    1

    Version

    1.0.2

    License

    MIT

    Unpacked Size

    88 kB

    Total Files

    8

    Last publish

    Collaborators

    • guidiego