A module to extract emoji as data for data analyze.
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.
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)Feel free to open issues, and pull request to help us improve this library :)