emojinator
v1.0.2
Published
A module to extract emoji as data for data analyze
Downloads
2
Readme
Emojinator
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 :)