{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "CPU times: user 4.47 s, sys: 1.01 s, total: 5.48 s\n",
      "Wall time: 5.37 s\n"
     ]
    }
   ],
   "source": [
    "%%time\n",
    "import malaya\n",
    "import numpy as np"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Why lexicon\n",
    "\n",
    "Lexicon is populated words related to certain domains, like, words for negative and positive sentiments.\n",
    "\n",
    "Example, word `suka` can represent as positive sentiment. If `suka` exists in a sentence, we can say that sentence is positive sentiment.\n",
    "\n",
    "Lexicon based is common way people use to classify a text and very fast. Again, it is pretty naive because a word can be semantically ambiguous."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## sentiment lexicon\n",
    "\n",
    "Malaya provided a small sample for sentiment lexicon, simply,"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "dict_keys(['negative', 'positive'])"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "sentiment_lexicon = malaya.lexicon.sentiment\n",
    "sentiment_lexicon.keys()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## emotion lexicon\n",
    "\n",
    "Malaya provided a small sample for emotion lexicon, simply,"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "dict_keys(['anger', 'fear', 'joy', 'love', 'sadness', 'surprise'])"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "emotion_lexicon = malaya.lexicon.emotion\n",
    "emotion_lexicon.keys()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Lexicon generator\n",
    "\n",
    "To build a lexicon is time consuming, because required expert domains to populate related words to the domains. With the help of word vector, we can induce sample words to specific domains given some annotated lexicon. Why we induced lexicon from word vector? Even for a word `suka` commonly represent positive sentiment, but if the word vector learnt the context of `suka` different polarity and based nearest words also represent different polarity, so `suka` got tendency to become negative sentiment.\n",
    "\n",
    "Malaya provided inducing lexicon interface, build on top of [Inducing Domain-Specific Sentiment Lexicons from Unlabeled Corpora](https://arxiv.org/pdf/1606.02820.pdf).\n",
    "\n",
    "Let say you have a lexicon based on standard language or `bahasa baku`, then you want to find similar lexicon on social media context. So you can use this `malaya.lexicon` interface. To use this interface, we must initiate `malaya.wordvector.load` first.\n",
    "\n",
    "And, at least small lexicon sample like this,\n",
    "\n",
    "```python\n",
    "{'label1': ['word1', 'word2'], 'label2': ['word3', 'word4']}\n",
    "```\n",
    "\n",
    "`label` can be more than 2, example like `malaya.lexicon.emotion`, up to 6 different labels."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [],
   "source": [
    "vocab, embedded = malaya.wordvector.load_social_media()\n",
    "wordvector = malaya.wordvector.load(embedded, vocab)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## random walk\n",
    "\n",
    "Random walk technique is main technique use by the paper, can read more at [3.2 Propagating polarities from a seed set](https://arxiv.org/abs/1606.02820)\n",
    "\n",
    "```python\n",
    "\n",
    "def random_walk(\n",
    "    lexicon,\n",
    "    wordvector,\n",
    "    pool_size = 10,\n",
    "    top_n = 20,\n",
    "    similarity_power = 100.0,\n",
    "    beta = 0.9,\n",
    "    arccos = True,\n",
    "    normalization = True,\n",
    "    soft = False,\n",
    "    silent = False,\n",
    "):\n",
    "\n",
    "    \"\"\"\n",
    "    Induce lexicon by using random walk technique, use in paper, https://arxiv.org/pdf/1606.02820.pdf\n",
    "\n",
    "    Parameters\n",
    "    ----------\n",
    "\n",
    "    lexicon: dict\n",
    "        curated lexicon from expert domain, {'label1': [str], 'label2': [str]}.\n",
    "    wordvector: object\n",
    "        wordvector interface object.\n",
    "    pool_size: int, optional (default=10)\n",
    "        pick top-pool size from each lexicons.\n",
    "    top_n: int, optional (default=20)\n",
    "        top_n for each vectors will multiple with `similarity_power`.\n",
    "    similarity_power: float, optional (default=100.0)\n",
    "        extra score for `top_n`, less will generate less bias induced but high chance unbalanced outcome.\n",
    "    beta: float, optional (default=0.9)\n",
    "        penalty score, towards to 1.0 means less penalty. 0 < beta < 1.\n",
    "    arccos: bool, optional (default=True)\n",
    "        covariance distribution for embedded.dot(embedded.T). If false, covariance + 1.\n",
    "    normalization: bool, optional (default=True)\n",
    "        normalize word vectors using L2 norm. L2 is good to penalize skewed vectors.\n",
    "    soft: bool, optional (default=False)\n",
    "        if True, a word not in the dictionary will be replaced with nearest jarowrinkler ratio.\n",
    "        if False, it will throw an exception if a word not in the dictionary.\n",
    "    silent: bool, optional (default=False)\n",
    "        if True, will not print any logs.\n",
    "        \n",
    "    Returns\n",
    "    -------\n",
    "    tuple: (labels[argmax(scores), axis = 1], scores, labels)\n",
    "    \n",
    "    \"\"\"\n",
    "\n",
    "```"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "populating nearest words from wordvector\n",
      "populating vectors from populated nearest words\n",
      "random walking from populated vectors \n",
      "\n",
      "CPU times: user 1min 36s, sys: 16.1 s, total: 1min 52s\n",
      "Wall time: 28.1 s\n"
     ]
    }
   ],
   "source": [
    "%%time\n",
    "\n",
    "results, scores, labels = malaya.lexicon.random_walk(sentiment_lexicon, wordvector, pool_size = 5)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(array(['negative', 'positive'], dtype='<U8'), array([2260, 2922]))"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.unique(list(results.values()), return_counts = True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'serang': 'negative',\n",
       " 'cilegon': 'positive',\n",
       " 'culik': 'negative',\n",
       " 'tanjungpinang': 'positive',\n",
       " 'jenguk': 'negative',\n",
       " 'luka': 'negative',\n",
       " 'jerawat': 'negative',\n",
       " 'infeksi': 'negative',\n",
       " 'migrain': 'negative',\n",
       " 'penyakit': 'negative',\n",
       " 'penaklukan': 'negative',\n",
       " '4ir': 'positive',\n",
       " 'renjer': 'positive',\n",
       " 'kezhaliman': 'positive',\n",
       " 'proklamator': 'positive',\n",
       " 'kelucahan': 'negative',\n",
       " 'pablisiti': 'positive',\n",
       " 'terjwp': 'positive',\n",
       " '33100': 'positive',\n",
       " 'impos': 'positive',\n",
       " 'kritikan': 'negative',\n",
       " 'mandat': 'negative',\n",
       " 'teguran': 'negative',\n",
       " 'persepsi': 'negative',\n",
       " 'pembelaan': 'negative',\n",
       " 'muflis': 'negative',\n",
       " 'mempelajarinya': 'negative',\n",
       " 'melarat': 'positive',\n",
       " 'dihabisi': 'positive',\n",
       " 'kooperatif': 'positive',\n",
       " 'kelemahan': 'negative',\n",
       " 'keyakinan': 'positive',\n",
       " 'kehendak': 'negative',\n",
       " 'keburukan': 'negative',\n",
       " 'gerombolan': 'negative',\n",
       " 'kelakuan': 'negative',\n",
       " 'antek': 'negative',\n",
       " 'politikus': 'negative',\n",
       " 'ulah': 'negative',\n",
       " 'debu': 'negative',\n",
       " 'kotoran': 'negative',\n",
       " 'polusi': 'negative',\n",
       " 'kuman': 'negative',\n",
       " 'keringat': 'negative',\n",
       " 'sinis': 'negative',\n",
       " 'misterius': 'positive',\n",
       " 'menggemaskan': 'positive',\n",
       " 'emosional': 'negative',\n",
       " 'progresif': 'positive',\n",
       " 'bocor': 'negative',\n",
       " 'pecah': 'negative',\n",
       " 'retak': 'negative',\n",
       " 'rosak': 'negative',\n",
       " 'terbalik': 'negative',\n",
       " 'kekacauan': 'negative',\n",
       " 'penindasan': 'negative',\n",
       " 'perdebatan': 'negative',\n",
       " 'kesombongan': 'negative',\n",
       " 'pengamatan': 'negative',\n",
       " 'permusuhan': 'negative',\n",
       " 'ketidakadilan': 'negative',\n",
       " 'empati': 'negative',\n",
       " 'perpecahan': 'negative',\n",
       " 'menghasut': 'negative',\n",
       " 'menghukum': 'negative',\n",
       " 'memfitnah': 'negative',\n",
       " 'memaki': 'negative',\n",
       " 'memprovokasi': 'negative',\n",
       " 'bersedih': 'negative',\n",
       " 'mengalah': 'negative',\n",
       " 'terlena': 'negative',\n",
       " 'cemburu': 'negative',\n",
       " 'dikenang': 'negative',\n",
       " 'jatuh': 'negative',\n",
       " 'terjatuh': 'negative',\n",
       " 'putus': 'negative',\n",
       " 'hilang': 'negative',\n",
       " 'hancur': 'negative',\n",
       " 'dipakai': 'negative',\n",
       " 'digunakan': 'negative',\n",
       " 'dikonsumsi': 'negative',\n",
       " 'dipake': 'negative',\n",
       " 'diminum': 'negative',\n",
       " 'harapan': 'negative',\n",
       " 'kebahagiaan': 'positive',\n",
       " 'impian': 'positive',\n",
       " 'cita2': 'negative',\n",
       " 'senyuman': 'positive',\n",
       " 'beban': 'negative',\n",
       " 'resiko': 'negative',\n",
       " 'kerugian': 'negative',\n",
       " 'tekanan': 'negative',\n",
       " 'risiko': 'negative',\n",
       " 'mencaci': 'negative',\n",
       " 'dicaci': 'negative',\n",
       " 'mengejek': 'negative',\n",
       " 'disia': 'negative',\n",
       " 'bengkak': 'negative',\n",
       " 'berair': 'negative',\n",
       " 'lebam': 'negative',\n",
       " 'lenguh': 'negative',\n",
       " 'toksik': 'negative',\n",
       " 'toksin': 'negative',\n",
       " 'pepejal': 'positive',\n",
       " 'kafein': 'negative',\n",
       " 'buih': 'negative',\n",
       " 'terperangkap': 'negative',\n",
       " 'dijumpai': 'negative',\n",
       " 'tersimpan': 'negative',\n",
       " 'tergabung': 'negative',\n",
       " 'bertarung': 'negative',\n",
       " 'rahsia': 'negative',\n",
       " 'cabaran': 'positive',\n",
       " 'petua': 'negative',\n",
       " 'persamaan': 'negative',\n",
       " 'punca': 'negative',\n",
       " 'fail': 'negative',\n",
       " 'failed': 'negative',\n",
       " 'approve': 'negative',\n",
       " 'consider': 'negative',\n",
       " 'freehair': 'negative',\n",
       " 'munafik': 'negative',\n",
       " 'dungu': 'negative',\n",
       " 'liberal': 'negative',\n",
       " 'rasis': 'negative',\n",
       " 'konservatif': 'negative',\n",
       " 'parasit': 'negative',\n",
       " 'klorofil': 'negative',\n",
       " 'klorin': 'positive',\n",
       " 'fibroid': 'negative',\n",
       " 'antibakteri': 'negative',\n",
       " 'menyesal': 'negative',\n",
       " 'nyesal': 'negative',\n",
       " 'terkejut': 'positive',\n",
       " 'terliur': 'positive',\n",
       " 'sebak': 'positive',\n",
       " 'pemberontakan': 'negative',\n",
       " 'kudeta': 'negative',\n",
       " 'feminisme': 'negative',\n",
       " 'keragaman': 'negative',\n",
       " 'kesangsian': 'negative',\n",
       " 'nelponke': 'positive',\n",
       " 'datebook': 'negative',\n",
       " '4dalzk': 'negative',\n",
       " 'ketidakpentinganku': 'positive',\n",
       " 'fasis': 'negative',\n",
       " 'portugis': 'negative',\n",
       " 'ateisme': 'positive',\n",
       " 'illuminati': 'negative',\n",
       " 'malang': 'negative',\n",
       " 'depok': 'positive',\n",
       " 'kediri': 'positive',\n",
       " 'semarang': 'positive',\n",
       " 'cirebon': 'positive',\n",
       " 'mendatangkan': 'negative',\n",
       " 'menimbulkan': 'negative',\n",
       " 'memupuk': 'negative',\n",
       " 'mengundang': 'negative',\n",
       " 'menghianati': 'negative',\n",
       " 'kejatuhan': 'negative',\n",
       " 'pelemahan': 'negative',\n",
       " 'lonjakan': 'negative',\n",
       " 'ketiadaan': 'negative',\n",
       " 'pengubahan': 'negative',\n",
       " 'memusnahkan': 'negative',\n",
       " 'mengadopsi': 'negative',\n",
       " 'merampas': 'negative',\n",
       " 'mengangkut': 'negative',\n",
       " 'mengarahkan': 'negative',\n",
       " 'kemarahan': 'negative',\n",
       " 'keimanan': 'positive',\n",
       " 'penderitaan': 'negative',\n",
       " 'wabak': 'negative',\n",
       " 'letupan': 'negative',\n",
       " 'jangkitan': 'negative',\n",
       " 'serangan': 'negative',\n",
       " 'jenayah': 'negative',\n",
       " 'tragedi': 'negative',\n",
       " 'peristiwa': 'negative',\n",
       " 'insiden': 'negative',\n",
       " 'kejadian': 'negative',\n",
       " 'menganggur': 'negative',\n",
       " 'dioptimalkan': 'positive',\n",
       " 'menyakitimu': 'positive',\n",
       " 'bernafsu': 'positive',\n",
       " 'derhaka': 'negative',\n",
       " 'menakan': 'negative',\n",
       " 'sulung': 'positive',\n",
       " 'bongsu': 'negative',\n",
       " 'teruna': 'negative',\n",
       " 'merungut': 'negative',\n",
       " 'komplen': 'negative',\n",
       " 'giveup': 'negative',\n",
       " 'melalak': 'negative',\n",
       " 'melawa': 'negative',\n",
       " 'berdarah': 'negative',\n",
       " 'bengkok': 'negative',\n",
       " 'layu': 'negative',\n",
       " 'ngeri': 'negative',\n",
       " 'serem': 'negative',\n",
       " 'kocak': 'negative',\n",
       " 'mantep': 'positive',\n",
       " 'miris': 'negative',\n",
       " 'menghina': 'negative',\n",
       " 'menuduh': 'negative',\n",
       " 'membenci': 'negative',\n",
       " 'menyalahkan': 'negative',\n",
       " 'menyekat': 'negative',\n",
       " 'menggenjot': 'negative',\n",
       " 'mengevaluasi': 'negative',\n",
       " 'mengalirkan': 'negative',\n",
       " 'melemahkan': 'negative',\n",
       " 'keengganan': 'negative',\n",
       " 'vendon': 'positive',\n",
       " 'koturno': 'positive',\n",
       " 'spesialisasikan': 'positive',\n",
       " \"'pembongkaran\": 'positive',\n",
       " 'neraka': 'negative',\n",
       " 'surga': 'negative',\n",
       " 'syurga': 'positive',\n",
       " 'kubur': 'negative',\n",
       " 'mesjid': 'negative',\n",
       " 'gerun': 'negative',\n",
       " 'betui2': 'positive',\n",
       " 'bankrup': 'positive',\n",
       " 'gamak': 'positive',\n",
       " 'mendobi': 'negative',\n",
       " 'penghapusan': 'negative',\n",
       " 'proyeksi': 'negative',\n",
       " 'realisasi': 'negative',\n",
       " 'pengendalian': 'negative',\n",
       " 'maraknya': 'negative',\n",
       " 'strike': 'negative',\n",
       " 'adop': 'positive',\n",
       " 'seats': 'positive',\n",
       " 'sponsored': 'positive',\n",
       " 'script': 'positive',\n",
       " 'pengangguran': 'negative',\n",
       " 'pns': 'negative',\n",
       " 'koruptor': 'negative',\n",
       " 'oposisi': 'negative',\n",
       " 'stunting': 'negative',\n",
       " 'mengamuk': 'negative',\n",
       " 'membebel': 'negative',\n",
       " 'menjerit': 'negative',\n",
       " 'meroyan': 'negative',\n",
       " 'bergaduh': 'negative',\n",
       " 'keruntuhan': 'negative',\n",
       " 'maxxie': 'positive',\n",
       " '081266267925': 'positive',\n",
       " 'evvadiki': 'positive',\n",
       " 'digibdulu': 'positive',\n",
       " 'kekuatan': 'negative',\n",
       " 'kepercayaan': 'positive',\n",
       " 'kesadaran': 'negative',\n",
       " 'hasrat': 'negative',\n",
       " 'radikal': 'negative',\n",
       " 'sekuler': 'negative',\n",
       " 'intoleran': 'negative',\n",
       " 'sosialis': 'negative',\n",
       " 'penagih': 'negative',\n",
       " 'penagihan': 'positive',\n",
       " 'professor': 'negative',\n",
       " 'keldai': 'negative',\n",
       " 'penebar': 'negative',\n",
       " 'menghentam': 'negative',\n",
       " 'jagungbakar': 'positive',\n",
       " 'pembakaram': 'positive',\n",
       " 'bajucoplemurah': 'positive',\n",
       " 'ma3i': 'positive',\n",
       " 'pembakar': 'negative',\n",
       " 'limpahan': 'positive',\n",
       " 'melarutkan': 'positive',\n",
       " 'pencegah': 'negative',\n",
       " 'merendam': 'positive',\n",
       " 'membakar': 'negative',\n",
       " 'mengikat': 'negative',\n",
       " 'membersihkan': 'positive',\n",
       " 'menghancurkan': 'negative',\n",
       " 'pembakaran': 'negative',\n",
       " 'penat': 'negative',\n",
       " 'letih': 'negative',\n",
       " 'stress': 'negative',\n",
       " 'bosan': 'negative',\n",
       " 'mengantuk': 'negative',\n",
       " 'binasa': 'negative',\n",
       " 'membengkak': 'positive',\n",
       " 'terpejam': 'positive',\n",
       " 'menggumpal': 'positive',\n",
       " 'bergoyang': 'negative',\n",
       " 'diasingkan': 'negative',\n",
       " 'difokuskan': 'negative',\n",
       " 'melindungimu': 'positive',\n",
       " 'terselamatkan': 'positive',\n",
       " 'tertid': 'positive',\n",
       " 'mengelak': 'negative',\n",
       " 'menyiasat': 'negative',\n",
       " 'menghindar': 'negative',\n",
       " 'mengelakkan': 'negative',\n",
       " 'dilepaskan': 'negative',\n",
       " 'tempur': 'negative',\n",
       " 'migas': 'negative',\n",
       " 'nuklir': 'negative',\n",
       " 'manufaktur': 'negative',\n",
       " 'ilegal': 'negative',\n",
       " 'discrimination': 'negative',\n",
       " 'dramaticnyer': 'positive',\n",
       " 'disuwek': 'positive',\n",
       " '6066030438': 'positive',\n",
       " 'fahdy': 'positive',\n",
       " 'merugikan': 'negative',\n",
       " 'meresahkan': 'negative',\n",
       " 'menimpa': 'negative',\n",
       " 'meyakinkan': 'positive',\n",
       " 'membanggakan': 'positive',\n",
       " 'membingungkan': 'negative',\n",
       " 'diperlihatkan': 'negative',\n",
       " 'dilakukannya': 'positive',\n",
       " 'disegani': 'positive',\n",
       " 'dititipkan': 'negative',\n",
       " 'fatal': 'positive',\n",
       " 'provokatif': 'positive',\n",
       " 'memprihatinkan': 'positive',\n",
       " 'ambisius': 'positive',\n",
       " 'mendasar': 'positive',\n",
       " 'peredaran': 'negative',\n",
       " 'sirkulasi': 'negative',\n",
       " 'pembuluh': 'negative',\n",
       " 'murka': 'negative',\n",
       " 'dilaknat': 'negative',\n",
       " 'diijabah': 'negative',\n",
       " 'berkehendak': 'negative',\n",
       " 'terusik': 'positive',\n",
       " 'virus': 'negative',\n",
       " 'hama': 'negative',\n",
       " 'stroke': 'negative',\n",
       " 'perkauman': 'negative',\n",
       " 'lgbt': 'negative',\n",
       " 'icerd': 'negative',\n",
       " 'rasuah': 'negative',\n",
       " 'politik': 'negative',\n",
       " 'kehancuran': 'negative',\n",
       " 'kedewasaan': 'negative',\n",
       " 'penjajahan': 'negative',\n",
       " 'menurun': 'negative',\n",
       " 'meningkat': 'negative',\n",
       " 'berkurang': 'negative',\n",
       " 'membaik': 'negative',\n",
       " 'meroket': 'negative',\n",
       " 'mengetepikan': 'negative',\n",
       " 'kuimplankan': 'positive',\n",
       " 'mountaineer': 'positive',\n",
       " 'chapalein': 'positive',\n",
       " '40365036': 'positive',\n",
       " 'penjara': 'negative',\n",
       " 'lokap': 'negative',\n",
       " 'mengekori': 'negative',\n",
       " 'c4uf5s': 'positive',\n",
       " '085602974529': 'positive',\n",
       " 'kebiasqan': 'positive',\n",
       " 'teamgoals': 'positive',\n",
       " 'bimbang': 'negative',\n",
       " 'khawatir': 'negative',\n",
       " 'kesal': 'positive',\n",
       " 'sungkan': 'negative',\n",
       " 'pemabuk': 'negative',\n",
       " 'adibrunner': 'positive',\n",
       " 'eppii': 'positive',\n",
       " '3s3bju': 'positive',\n",
       " 'jakwir': 'positive',\n",
       " 'pemukul': 'negative',\n",
       " 'seminaronline7': 'positive',\n",
       " 'gemoksaya': 'positive',\n",
       " 'gabisabisa': 'positive',\n",
       " 'berocorak': 'positive',\n",
       " 'penentangan': 'negative',\n",
       " 'livescreen': 'positive',\n",
       " 'meliriktelegramdan': 'positive',\n",
       " '081334186600': 'positive',\n",
       " 'indox': 'positive',\n",
       " 'terdesak': 'negative',\n",
       " 'desperate': 'negative',\n",
       " 'bebal': 'negative',\n",
       " 'fobia': 'negative',\n",
       " 'nekad': 'positive',\n",
       " 'tahi': 'negative',\n",
       " 'taik': 'negative',\n",
       " 'bangkai': 'negative',\n",
       " 'seekor': 'negative',\n",
       " 'ulat': 'negative',\n",
       " 'kesusahan': 'negative',\n",
       " 'kesedihan': 'negative',\n",
       " 'keraguan': 'negative',\n",
       " 'berdepan': 'negative',\n",
       " 'dikaitkan': 'negative',\n",
       " 'dimulakan': 'negative',\n",
       " 'mengesan': 'negative',\n",
       " 'dikejutkan': 'negative',\n",
       " 'tamak': 'negative',\n",
       " 'biadap': 'negative',\n",
       " 'bongkak': 'negative',\n",
       " 'angkuh': 'negative',\n",
       " 'pendarahan': 'negative',\n",
       " 'alahan': 'negative',\n",
       " 'pembengkakan': 'negative',\n",
       " 'kegatalan': 'negative',\n",
       " 'komplikasi': 'negative',\n",
       " 'dirosakkan': 'negative',\n",
       " 'sajadahmasjid': 'positive',\n",
       " 'wisatalumajang': 'positive',\n",
       " 'dsmua': 'positive',\n",
       " 'otogod': 'positive',\n",
       " 'kekufuran': 'negative',\n",
       " 'auratnya': 'positive',\n",
       " 'kebhinekaan': 'positive',\n",
       " 'kekuatannya': 'negative',\n",
       " 'maksiat': 'negative',\n",
       " 'zina': 'negative',\n",
       " 'provokasi': 'negative',\n",
       " 'syirik': 'negative',\n",
       " 'dicemari': 'negative',\n",
       " 'bergandingan': 'negative',\n",
       " 'diperankan': 'positive',\n",
       " 'dihalang': 'negative',\n",
       " 'bpuasa': 'positive',\n",
       " 'merobohkan': 'negative',\n",
       " 'wediaraya': 'positive',\n",
       " 'pliharaku': 'positive',\n",
       " 'diinfor': 'positive',\n",
       " 'ivgfood': 'positive',\n",
       " 'mencuri': 'negative',\n",
       " 'pecahkan': 'negative',\n",
       " 'sumbang': 'negative',\n",
       " 'meminjam': 'negative',\n",
       " 'curi': 'negative',\n",
       " 'disembelih': 'negative',\n",
       " 'terobati': 'negative',\n",
       " 'diangetin': 'positive',\n",
       " 'berharta': 'positive',\n",
       " 'dituliskan': 'positive',\n",
       " 'pengepungan': 'negative',\n",
       " 'menyamoaikan': 'positive',\n",
       " 'kihoii': 'positive',\n",
       " 'sukasukanya': 'positive',\n",
       " '085740709892': 'positive',\n",
       " 'menyeleweng': 'negative',\n",
       " 'bukanyah': 'positive',\n",
       " 'terlangkap': 'positive',\n",
       " 'nurulady_sandwich': 'positive',\n",
       " 'spupet': 'positive',\n",
       " 'krisis': 'negative',\n",
       " 'konflik': 'negative',\n",
       " 'kekhawatiran': 'negative',\n",
       " 'keterbatasan': 'negative',\n",
       " 'ancaman': 'negative',\n",
       " 'dipadamkan': 'negative',\n",
       " 'diagungkan': 'positive',\n",
       " 'digunapakai': 'positive',\n",
       " 'dikenalpasti': 'negative',\n",
       " 'digariskan': 'positive',\n",
       " 'sumpahan': 'negative',\n",
       " 'busuknya': 'negative',\n",
       " 'raklu': 'positive',\n",
       " 'adela': 'negative',\n",
       " 'sgguh': 'positive',\n",
       " 'merebut': 'negative',\n",
       " 'memindahkan': 'negative',\n",
       " 'menyelamatkan': 'negative',\n",
       " 'memperluas': 'negative',\n",
       " 'pembangkang': 'negative',\n",
       " 'ppbm': 'negative',\n",
       " 'bn': 'negative',\n",
       " 'tmj': 'negative',\n",
       " 'pkr': 'negative',\n",
       " 'bercanggah': 'negative',\n",
       " 'berkerjasama': 'negative',\n",
       " 'diberhentikan': 'negative',\n",
       " 'terpalit': 'negative',\n",
       " 'selari': 'negative',\n",
       " 'penalty': 'negative',\n",
       " 'lipliner': 'positive',\n",
       " 'glasses': 'positive',\n",
       " 'kdak': 'positive',\n",
       " 'logbook': 'positive',\n",
       " 'tergantung': 'negative',\n",
       " 'beda': 'negative',\n",
       " 'berbeda': 'positive',\n",
       " 'gatau': 'negative',\n",
       " 'berdasarkan': 'negative',\n",
       " 'longgar': 'negative',\n",
       " 'ketat': 'positive',\n",
       " 'sendat': 'positive',\n",
       " 'ramping': 'positive',\n",
       " 'dijahit': 'negative',\n",
       " 'kontroversi': 'negative',\n",
       " 'kezaliman': 'negative',\n",
       " 'penolakan': 'negative',\n",
       " 'menakutkan': 'negative',\n",
       " 'menyedihkan': 'negative',\n",
       " 'mengerikan': 'negative',\n",
       " 'mendebarkan': 'positive',\n",
       " 'dibenci': 'negative',\n",
       " 'mengusik': 'negative',\n",
       " 'memberkahi': 'positive',\n",
       " 'menyirami': 'negative',\n",
       " 'memantulkan': 'negative',\n",
       " 'menampar': 'negative',\n",
       " 'problem': 'negative',\n",
       " 'prob': 'positive',\n",
       " 'down': 'negative',\n",
       " 'error': 'negative',\n",
       " 'function': 'positive',\n",
       " 'pelarian': 'negative',\n",
       " 'pengemis': 'negative',\n",
       " 'jurnalis': 'negative',\n",
       " 'primadona': 'negative',\n",
       " 'buzzer': 'negative',\n",
       " 'lengkap': 'negative',\n",
       " 'lengkapnya': 'positive',\n",
       " 'komplit': 'positive',\n",
       " 'pengirim': 'negative',\n",
       " 'simpel': 'positive',\n",
       " 'bencana': 'negative',\n",
       " 'musibah': 'negative',\n",
       " 'tsunami': 'negative',\n",
       " 'kerusuhan': 'negative',\n",
       " 'rompakan': 'negative',\n",
       " 'samun': 'negative',\n",
       " 'lynas': 'negative',\n",
       " 'rusuhan': 'negative',\n",
       " 'penyelewengan': 'negative',\n",
       " 'meletup': 'negative',\n",
       " 'tercabut': 'negative',\n",
       " 'terkencing': 'negative',\n",
       " 'pitam': 'negative',\n",
       " 'letup': 'negative',\n",
       " 'membosankan': 'negative',\n",
       " 'menyebalkan': 'negative',\n",
       " 'rumit': 'negative',\n",
       " 'bantahan': 'negative',\n",
       " 'cenderahati': 'negative',\n",
       " 'instruksi': 'negative',\n",
       " 'ketertarikan': 'negative',\n",
       " 'penghasut': 'negative',\n",
       " 'hasanudin': 'positive',\n",
       " 'astuti': 'positive',\n",
       " 'kurva': 'positive',\n",
       " 'gerd': 'positive',\n",
       " 'ribut': 'negative',\n",
       " 'ngeluh': 'negative',\n",
       " 'rusuh': 'negative',\n",
       " 'berantem': 'negative',\n",
       " 'ngumpul': 'negative',\n",
       " 'bergelut': 'negative',\n",
       " 'disibukkan': 'negative',\n",
       " 'berkolaborasi': 'negative',\n",
       " 'berkutat': 'negative',\n",
       " 'khinzir': 'negative',\n",
       " 'cmnie': 'positive',\n",
       " 'kecikk': 'positive',\n",
       " 'instafemes': 'positive',\n",
       " 'siuk': 'positive',\n",
       " 'gangguan': 'negative',\n",
       " 'kerusakan': 'negative',\n",
       " 'permasalahan': 'negative',\n",
       " 'berisiko': 'negative',\n",
       " 'beresiko': 'positive',\n",
       " 'rentan': 'negative',\n",
       " 'berpotensi': 'negative',\n",
       " 'disyaki': 'negative',\n",
       " 'mengetuk': 'negative',\n",
       " 'membukakan': 'negative',\n",
       " 'bukain': 'negative',\n",
       " 'ngetok': 'negative',\n",
       " 'bukakan': 'negative',\n",
       " 'memutuskan': 'negative',\n",
       " 'berkomitmen': 'positive',\n",
       " 'berencana': 'negative',\n",
       " 'berniat': 'negative',\n",
       " 'diminta': 'negative',\n",
       " 'penceroboh': 'negative',\n",
       " 'keperpercayaan': 'positive',\n",
       " 'coherence': 'positive',\n",
       " 'lgdnya': 'positive',\n",
       " \"deto'x\": 'positive',\n",
       " 'sindiran': 'negative',\n",
       " 'heroik': 'positive',\n",
       " 'ceramahnya': 'positive',\n",
       " 'petuah': 'negative',\n",
       " 'ketegasan': 'negative',\n",
       " 'hukuman': 'negative',\n",
       " 'pidana': 'negative',\n",
       " 'sanksi': 'negative',\n",
       " 'najis': 'negative',\n",
       " 'cicak': 'negative',\n",
       " 'iblis': 'negative',\n",
       " 'depresi': 'negative',\n",
       " 'mengharamkan': 'negative',\n",
       " 'memaknai': 'negative',\n",
       " 'meragukan': 'negative',\n",
       " 'mengedepankan': 'negative',\n",
       " 'kelaparan': 'negative',\n",
       " 'kesepian': 'negative',\n",
       " 'tenggelam': 'negative',\n",
       " 'gelisah': 'negative',\n",
       " 'terluka': 'negative',\n",
       " 'korupsi': 'negative',\n",
       " 'makar': 'negative',\n",
       " 'kriminal': 'negative',\n",
       " 'vandalisme': 'negative',\n",
       " 'penipuan': 'negative',\n",
       " 'kebencian': 'negative',\n",
       " 'kebohongan': 'negative',\n",
       " 'hoaks': 'negative',\n",
       " 'dusta': 'negative',\n",
       " 'inflasi': 'negative',\n",
       " 'apbn': 'negative',\n",
       " 'trauma': 'negative',\n",
       " 'mual': 'negative',\n",
       " 'stres': 'negative',\n",
       " 'badmood': 'negative',\n",
       " 'keradangan': 'negative',\n",
       " 'pigmentasi': 'negative',\n",
       " 'peradangan': 'negative',\n",
       " 'keletihan': 'negative',\n",
       " 'selulit': 'negative',\n",
       " 'kesilapan': 'negative',\n",
       " 'kesalahan': 'negative',\n",
       " 'kemusnahan': 'negative',\n",
       " 'perbendeharaan': 'positive',\n",
       " 'romanticist': 'positive',\n",
       " 'deseu2': 'positive',\n",
       " 'menyjilat': 'positive',\n",
       " 'benci': 'negative',\n",
       " 'menyampah': 'positive',\n",
       " 'jijik': 'negative',\n",
       " 'kagum': 'positive',\n",
       " 'geli': 'positive',\n",
       " 'mendesak': 'negative',\n",
       " 'mengkritik': 'negative',\n",
       " 'menggesa': 'negative',\n",
       " 'menghimbau': 'negative',\n",
       " 'diperintah': 'negative',\n",
       " 'tahap': 'negative',\n",
       " 'level': 'negative',\n",
       " 'fasa': 'negative',\n",
       " 'tingkat': 'negative',\n",
       " 'babak': 'negative',\n",
       " 'praktikal': 'negative',\n",
       " 'kaunseling': 'negative',\n",
       " 'stpm': 'negative',\n",
       " 'pt3': 'negative',\n",
       " 'practical': 'negative',\n",
       " 'dahsyat': 'negative',\n",
       " 'tragis': 'negative',\n",
       " 'dasyat': 'negative',\n",
       " 'kematian': 'negative',\n",
       " 'pembunuhan': 'negative',\n",
       " 'kekalahan': 'negative',\n",
       " 'kebodohan': 'negative',\n",
       " 'pembelotan': 'negative',\n",
       " 'bis2lo': 'negative',\n",
       " 'nepisnya': 'positive',\n",
       " 'stabizernya': 'negative',\n",
       " 'dziewczynka': 'negative',\n",
       " 'mengkhianati': 'negative',\n",
       " 'mengabaikan': 'negative',\n",
       " 'menyembah': 'negative',\n",
       " 'meremehkan': 'negative',\n",
       " 'perbuatannya': 'negative',\n",
       " 'protes': 'negative',\n",
       " 'kritik': 'negative',\n",
       " 'dibela': 'negative',\n",
       " 'rekonsiliasi': 'negative',\n",
       " 'diusir': 'negative',\n",
       " 'tuduhan': 'negative',\n",
       " 'dakwaan': 'negative',\n",
       " 'perbuatan': 'negative',\n",
       " 'tuntutan': 'negative',\n",
       " 'dadah': 'negative',\n",
       " 'hey': 'positive',\n",
       " 'astagfirullah': 'negative',\n",
       " 'heh': 'negative',\n",
       " 'fak': 'positive',\n",
       " 'ditakuti': 'negative',\n",
       " 'diharamkan': 'negative',\n",
       " 'dicintai': 'positive',\n",
       " 'nasionalis': 'negative',\n",
       " 'mengalir': 'negative',\n",
       " 'tumpah': 'negative',\n",
       " 'merebak': 'negative',\n",
       " 'dimasukkan': 'negative',\n",
       " 'terjun': 'negative',\n",
       " 'mencederakan': 'negative',\n",
       " 'mummuy': 'positive',\n",
       " 'pkdnya': 'positive',\n",
       " 'dilepasi': 'positive',\n",
       " 'tolak': 'negative',\n",
       " 'keluarkan': 'negative',\n",
       " 'tuntut': 'negative',\n",
       " 'pegang': 'negative',\n",
       " 'kutip': 'negative',\n",
       " 'khianat': 'negative',\n",
       " 'bersaksi': 'negative',\n",
       " 'dipersalahkan': 'positive',\n",
       " 'menyeksa': 'negative',\n",
       " 'morah2': 'positive',\n",
       " 'hakimnegara': 'positive',\n",
       " 'princemmed': 'positive',\n",
       " 'bedaken': 'positive',\n",
       " 'kemelesetan': 'negative',\n",
       " 'raauww': 'positive',\n",
       " \"'aiyok\": 'positive',\n",
       " '15dan': 'positive',\n",
       " 'huina': 'positive',\n",
       " 'melumpuhkan': 'negative',\n",
       " 'dipercayakan': 'positive',\n",
       " 'direbut': 'negative',\n",
       " 'menyasar': 'positive',\n",
       " 'mengetuai': 'negative',\n",
       " 'kesengsaraan': 'negative',\n",
       " 'kebermanfaatan': 'positive',\n",
       " 'kegelisahan': 'negative',\n",
       " 'berkabung': 'negative',\n",
       " 'berbasikal': 'positive',\n",
       " 'berbisnes': 'negative',\n",
       " 'memuncak': 'positive',\n",
       " 'berbahas': 'negative',\n",
       " 'pengakuan': 'negative',\n",
       " 'kesaksian': 'negative',\n",
       " 'pernyataan': 'negative',\n",
       " 'perang': 'negative',\n",
       " 'neraca': 'negative',\n",
       " 'negosiasi': 'negative',\n",
       " 'kebangkitan': 'positive',\n",
       " 'menyerahkan': 'negative',\n",
       " 'menyalurkan': 'negative',\n",
       " 'membagikan': 'negative',\n",
       " 'serahkan': 'negative',\n",
       " 'mengajukan': 'negative',\n",
       " 'hutang': 'negative',\n",
       " 'utang': 'negative',\n",
       " 'pendapatan': 'negative',\n",
       " 'pajak': 'negative',\n",
       " 'cukai': 'negative',\n",
       " 'saingan': 'negative',\n",
       " 'trofi': 'positive',\n",
       " 'pertarungan': 'negative',\n",
       " 'kompetisi': 'negative',\n",
       " 'klasemen': 'negative',\n",
       " 'mengeruhkan': 'negative',\n",
       " 'zuaini': 'positive',\n",
       " 'sedip': 'positive',\n",
       " '7572687': 'positive',\n",
       " 'sesiapo': 'positive',\n",
       " 'mengemis': 'negative',\n",
       " 'tanyaa': 'negative',\n",
       " 'feeling2': 'positive',\n",
       " 'berdendam': 'negative',\n",
       " 'bermasalah': 'negative',\n",
       " 'sensitif': 'positive',\n",
       " 'terganggu': 'negative',\n",
       " 'berjerawat': 'positive',\n",
       " 'menghitam': 'positive',\n",
       " 'disaster': 'negative',\n",
       " 'ngisahin': 'positive',\n",
       " 'butoset': 'positive',\n",
       " 'stuffed': 'positive',\n",
       " 'kayk': 'positive',\n",
       " 'rapuh': 'negative',\n",
       " 'rebah': 'negative',\n",
       " 'mengering': 'positive',\n",
       " 'kaku': 'negative',\n",
       " 'hti': 'negative',\n",
       " 'syaitan': 'negative',\n",
       " 'pembohong': 'negative',\n",
       " 'opposition': 'negative',\n",
       " 'accord': 'positive',\n",
       " 'hone': 'positive',\n",
       " 'writternya': 'positive',\n",
       " 'memahat': 'positive',\n",
       " 'dikawal': 'negative',\n",
       " 'ditangani': 'negative',\n",
       " 'diselamatkan': 'negative',\n",
       " 'diselesaikan': 'negative',\n",
       " 'dilewati': 'negative',\n",
       " 'beracun': 'negative',\n",
       " 'lazim': 'positive',\n",
       " 'merbahaya': 'positive',\n",
       " 'mengkilap': 'positive',\n",
       " 'berbahaya': 'negative',\n",
       " 'gross': 'negative',\n",
       " 'paint': 'positive',\n",
       " 'bunny': 'positive',\n",
       " 'teriyaki': 'positive',\n",
       " 'panther': 'positive',\n",
       " 'menghantui': 'negative',\n",
       " 'menyiksa': 'negative',\n",
       " 'menuntun': 'negative',\n",
       " 'cintakan': 'negative',\n",
       " 'membohongi': 'negative',\n",
       " 'bodoh': 'negative',\n",
       " 'bangang': 'negative',\n",
       " 'bodo': 'positive',\n",
       " 'noob': 'negative',\n",
       " 'merenggangkan': 'negative',\n",
       " 'nowel2': 'positive',\n",
       " 'memmpesonahh': 'positive',\n",
       " 'sotoguk': 'positive',\n",
       " 'promotinggal2harilagiburuuaann': 'positive',\n",
       " 'polemik': 'negative',\n",
       " 'penahanan': 'negative',\n",
       " 'usulan': 'negative',\n",
       " 'pertikaian': 'negative',\n",
       " 'sejarahnya': 'negative',\n",
       " 'kejanggalan': 'negative',\n",
       " 'petaka': 'negative',\n",
       " 'tamparan': 'negative',\n",
       " 'takut': 'negative',\n",
       " 'risau': 'negative',\n",
       " 'malu': 'negative',\n",
       " 'segan': 'negative',\n",
       " 'ketinggalan': 'negative',\n",
       " 'kehabisan': 'negative',\n",
       " 'kebagian': 'negative',\n",
       " 'lewatkan': 'negative',\n",
       " 'terlepas': 'negative',\n",
       " 'paksaan': 'negative',\n",
       " 'kejelasan': 'negative',\n",
       " 'batasnya': 'negative',\n",
       " 'halangan': 'negative',\n",
       " 'bingung': 'negative',\n",
       " 'penasaran': 'positive',\n",
       " 'mikir': 'negative',\n",
       " 'kepikiran': 'negative',\n",
       " 'males': 'negative',\n",
       " 'ditinggalkan': 'negative',\n",
       " 'dibunuh': 'negative',\n",
       " 'dihina': 'negative',\n",
       " 'dijalani': 'negative',\n",
       " 'dilanda': 'negative',\n",
       " 'mengidap': 'negative',\n",
       " 'picu': 'negative',\n",
       " 'memicu': 'negative',\n",
       " 'terjangkit': 'negative',\n",
       " 'penyerang': 'negative',\n",
       " 'gelandang': 'negative',\n",
       " 'pembalap': 'negative',\n",
       " 'manajer': 'negative',\n",
       " 'kiper': 'negative',\n",
       " 'mencurigai': 'negative',\n",
       " 'zemwah': 'positive',\n",
       " 'enenenenenene': 'positive',\n",
       " 'destroyers': 'positive',\n",
       " 'norsyida': 'positive',\n",
       " 'memarahi': 'negative',\n",
       " 'dereta': 'positive',\n",
       " 'pengambil': 'positive',\n",
       " 'menjudge': 'positive',\n",
       " 'disodorin': 'positive',\n",
       " 'disentuh': 'negative',\n",
       " 'memakainya': 'negative',\n",
       " 'membacanya': 'negative',\n",
       " 'dicerna': 'negative',\n",
       " 'dihilangkan': 'negative',\n",
       " 'membimbangkan': 'negative',\n",
       " 'dibaiat': 'positive',\n",
       " 'memenatkan': 'negative',\n",
       " 'diingati': 'positive',\n",
       " 'perosak': 'negative',\n",
       " 'penghianat': 'negative',\n",
       " 'pembela': 'negative',\n",
       " 'perusak': 'negative',\n",
       " 'minoriti': 'negative',\n",
       " 'kemudaratan': 'negative',\n",
       " 'kainavailable': 'positive',\n",
       " 'angesti': 'positive',\n",
       " 'konsta': 'positive',\n",
       " 'togor2': 'positive',\n",
       " 'menangkis': 'negative',\n",
       " 'gobindh': 'positive',\n",
       " \"k'sasar\": 'positive',\n",
       " 'mgnr': 'positive',\n",
       " 'kemesu': 'positive',\n",
       " 'rugi': 'negative',\n",
       " 'untung': 'negative',\n",
       " 'berdosa': 'negative',\n",
       " 'berbaloi': 'positive',\n",
       " 'terasa': 'negative',\n",
       " 'merasa': 'negative',\n",
       " 'berdebar': 'negative',\n",
       " 'terlihat': 'positive',\n",
       " 'berasa': 'negative',\n",
       " 'tebusan': 'negative',\n",
       " '082257468845': 'positive',\n",
       " 'penghakiman': 'positive',\n",
       " 'dihafal': 'positive',\n",
       " 'kecelaruan': 'negative',\n",
       " 'pakvwi': 'positive',\n",
       " 'mwamuna': 'positive',\n",
       " 'hapepend': 'positive',\n",
       " 'mengekuarkan': 'positive',\n",
       " 'kasar': 'negative',\n",
       " 'kotor': 'negative',\n",
       " 'halus': 'positive',\n",
       " 'kusam': 'positive',\n",
       " 'memaksa': 'negative',\n",
       " 'menyayangi': 'negative',\n",
       " 'menyuruh': 'negative',\n",
       " 'menyakiti': 'negative',\n",
       " 'fanatik': 'negative',\n",
       " 'toleran': 'positive',\n",
       " 'zalim': 'negative',\n",
       " 'atheis': 'negative',\n",
       " 'kemiskinan': 'negative',\n",
       " 'pelampau': 'negative',\n",
       " 'dicekal': 'positive',\n",
       " 'ysfheartnezia': 'positive',\n",
       " 'photograther': 'positive',\n",
       " 'ntuh': 'positive',\n",
       " 'takot': 'negative',\n",
       " 'teror': 'negative',\n",
       " 'menyerang': 'negative',\n",
       " 'membunuh': 'negative',\n",
       " 'membela': 'negative',\n",
       " 'menolong': 'negative',\n",
       " 'menjatuhkan': 'negative',\n",
       " 'menyamakan': 'negative',\n",
       " 'meninggalkan': 'negative',\n",
       " 'menemui': 'negative',\n",
       " 'tinggalkan': 'negative',\n",
       " 'menemukan': 'negative',\n",
       " 'mengubah': 'negative',\n",
       " 'miskin': 'negative',\n",
       " 'goblok': 'negative',\n",
       " 'jelek': 'negative',\n",
       " 'jomblo': 'negative',\n",
       " 'bego': 'negative',\n",
       " 'siber': 'negative',\n",
       " 'undang2': 'negative',\n",
       " 'menangis': 'negative',\n",
       " 'nangis': 'negative',\n",
       " 'tertidur': 'negative',\n",
       " 'tertunggak': 'negative',\n",
       " 'langsai': 'positive',\n",
       " 'rm2k': 'positive',\n",
       " 'rm450': 'negative',\n",
       " 'xsilap': 'positive',\n",
       " 'lucah': 'negative',\n",
       " 'porno': 'negative',\n",
       " 'semburit': 'negative',\n",
       " 'seks': 'negative',\n",
       " '3gp': 'negative',\n",
       " 'mengalami': 'negative',\n",
       " 'menderita': 'negative',\n",
       " 'merasakan': 'negative',\n",
       " 'menyebabkan': 'negative',\n",
       " 'musnah': 'negative',\n",
       " 'lenyap': 'negative',\n",
       " 'sengsara': 'negative',\n",
       " 'stereotaip': 'negative',\n",
       " 'ahmbs': 'positive',\n",
       " 'radangmembaik': 'positive',\n",
       " 'escapepenang': 'positive',\n",
       " 'f7szfx': 'positive',\n",
       " 'ironinya': 'negative',\n",
       " 'moyez': 'positive',\n",
       " 'mauloee': 'positive',\n",
       " 'ndakanamirana': 'positive',\n",
       " 'skf3013': 'positive',\n",
       " 'pergolakan': 'negative',\n",
       " 'gelembung': 'negative',\n",
       " 'menghadkan': 'negative',\n",
       " 'wardrobenya': 'positive',\n",
       " 'anrara': 'positive',\n",
       " 'tukaanza': 'positive',\n",
       " 'tersebutnya': 'positive',\n",
       " 'hamba': 'negative',\n",
       " 'hambanya': 'negative',\n",
       " 'firman': 'negative',\n",
       " 'takdir': 'negative',\n",
       " 'rasul': 'negative',\n",
       " 'memburukkan': 'negative',\n",
       " 'tubuhkan': 'negative',\n",
       " 'menggulingkan': 'negative',\n",
       " 'meruntuhkan': 'negative',\n",
       " 'membantai': 'negative',\n",
       " 'haiwan': 'negative',\n",
       " 'dajjal': 'negative',\n",
       " 'penyamun': 'negative',\n",
       " 'sampah': 'negative',\n",
       " 'rumput': 'negative',\n",
       " 'racun': 'negative',\n",
       " 'rokok': 'negative',\n",
       " 'dengki': 'negative',\n",
       " 'jeles': 'positive',\n",
       " 'sombong': 'negative',\n",
       " 'hasutan': 'negative',\n",
       " 'palsu': 'negative',\n",
       " 'negatif': 'negative',\n",
       " ...}"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "results"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "populating nearest words from wordvector\n",
      "populating vectors from populated nearest words\n",
      "random walking from populated vectors \n",
      "\n",
      "CPU times: user 5.9 s, sys: 3.13 s, total: 9.03 s\n",
      "Wall time: 1.5 s\n"
     ]
    }
   ],
   "source": [
    "%%time\n",
    "\n",
    "results_emotion, scores_emotion, labels_emotion = malaya.lexicon.random_walk(emotion_lexicon, \n",
    "                                                                             wordvector,\n",
    "                                                                             pool_size = 10)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(array(['anger', 'fear', 'joy', 'love', 'sadness', 'surprise'], dtype='<U8'),\n",
       " array([ 76, 156,  14, 132,  40,  34]))"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.unique(list(results_emotion.values()), return_counts = True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'sebal': 'anger',\n",
       " 'gesture': 'anger',\n",
       " 'se7': 'anger',\n",
       " 'ziraa': 'love',\n",
       " 'mantepp': 'love',\n",
       " 'mesem': 'love',\n",
       " 'nggapapa': 'love',\n",
       " 'maen2': 'love',\n",
       " 'gacocok': 'anger',\n",
       " 'jeongwoo': 'love',\n",
       " 'bergelora': 'anger',\n",
       " 'mereda': 'anger',\n",
       " 'skeptis': 'anger',\n",
       " 'gebus': 'love',\n",
       " 'tyrion': 'love',\n",
       " 'memuncak': 'anger',\n",
       " 'mewabah': 'love',\n",
       " 'mengenaskan': 'anger',\n",
       " 'kesasar': 'love',\n",
       " 'kepedean': 'love',\n",
       " 'annoying': 'anger',\n",
       " 'awkward': 'fear',\n",
       " 'scary': 'fear',\n",
       " 'handsome': 'fear',\n",
       " 'nervous': 'fear',\n",
       " 'cringe': 'fear',\n",
       " 'menyampah': 'fear',\n",
       " 'kelakar': 'fear',\n",
       " 'cute': 'fear',\n",
       " 'cuak': 'fear',\n",
       " 'bodoh': 'anger',\n",
       " 'bangang': 'anger',\n",
       " 'bebal': 'anger',\n",
       " 'bodo': 'fear',\n",
       " 'noob': 'fear',\n",
       " 'bengap': 'fear',\n",
       " 'celaka': 'fear',\n",
       " 'biadap': 'fear',\n",
       " 'pukimak': 'fear',\n",
       " 'berang': 'anger',\n",
       " 'buru': 'anger',\n",
       " 'nerus': 'anger',\n",
       " 'kangsar': 'anger',\n",
       " 'lipis': 'anger',\n",
       " 'pilah': 'anger',\n",
       " 'besut': 'anger',\n",
       " 'krai': 'anger',\n",
       " 'klawang': 'anger',\n",
       " 'ketil': 'anger',\n",
       " 'amuk': 'anger',\n",
       " 'mbatin': 'love',\n",
       " 'sebarin': 'love',\n",
       " 'sebarisan': 'love',\n",
       " 'ngalami': 'love',\n",
       " 'tikt': 'love',\n",
       " 'diharga': 'love',\n",
       " 'threesome': 'love',\n",
       " 'shizuka': 'love',\n",
       " 'bokondini': 'love',\n",
       " 'mendidih': 'anger',\n",
       " 'mengental': 'anger',\n",
       " 'sebati': 'anger',\n",
       " 'mengembang': 'anger',\n",
       " 'layu': 'anger',\n",
       " 'kecoklatan': 'anger',\n",
       " 'matang': 'anger',\n",
       " 'meresap': 'anger',\n",
       " 'mengering': 'anger',\n",
       " 'direbus': 'anger',\n",
       " 'pengecut': 'anger',\n",
       " 'bajingan': 'anger',\n",
       " 'pembohong': 'anger',\n",
       " 'pecundang': 'anger',\n",
       " 'dungu': 'anger',\n",
       " 'pemberani': 'anger',\n",
       " 'negarawan': 'anger',\n",
       " 'jahil': 'anger',\n",
       " 'biadab': 'anger',\n",
       " 'provokator': 'anger',\n",
       " 'bengang': 'anger',\n",
       " 'menyirap': 'fear',\n",
       " 'meluat': 'fear',\n",
       " 'frust': 'fear',\n",
       " 'rimas': 'fear',\n",
       " 'annoyed': 'fear',\n",
       " 'lonely': 'fear',\n",
       " 'berdukacita': 'anger',\n",
       " 'menyakitimu': 'anger',\n",
       " 'bersinggungan': 'love',\n",
       " 'bermesra': 'love',\n",
       " 'meridhoi': 'anger',\n",
       " 'menyelubungi': 'love',\n",
       " 'empukk': 'love',\n",
       " 'berserban': 'love',\n",
       " 'diracuni': 'love',\n",
       " 'dibayangi': 'love',\n",
       " 'jengkel': 'anger',\n",
       " 'gugup': 'anger',\n",
       " 'dibiasain': 'love',\n",
       " 'mubazir': 'anger',\n",
       " 'amnesia': 'anger',\n",
       " 'psikopat': 'anger',\n",
       " 'gumoh': 'love',\n",
       " 'diurusin': 'love',\n",
       " 'ngangenin': 'anger',\n",
       " 'purging': 'anger',\n",
       " 'babi': 'anger',\n",
       " 'sial': 'fear',\n",
       " 'kimak': 'fear',\n",
       " 'anjing': 'anger',\n",
       " 'pundek': 'fear',\n",
       " 'cibai': 'fear',\n",
       " 'setan': 'anger',\n",
       " 'lembu': 'anger',\n",
       " 'pedar': 'anger',\n",
       " 'sanwya': 'love',\n",
       " 'qabaya': 'love',\n",
       " '5pac': 'love',\n",
       " 'wa082336409906': 'love',\n",
       " 'mpibg': 'love',\n",
       " 'honachahthu': 'anger',\n",
       " 'unieleven': 'love',\n",
       " 'mengepilkan': 'anger',\n",
       " 'ciknorzaidi': 'love',\n",
       " 'benci': 'anger',\n",
       " 'jijik': 'fear',\n",
       " 'kagum': 'surprise',\n",
       " 'geli': 'fear',\n",
       " 'insecure': 'fear',\n",
       " 'geram': 'fear',\n",
       " 'respect': 'fear',\n",
       " 'jealous': 'fear',\n",
       " 'marah': 'anger',\n",
       " 'maki': 'fear',\n",
       " 'merajuk': 'fear',\n",
       " 'marah2': 'surprise',\n",
       " 'perli': 'fear',\n",
       " 'jeles': 'fear',\n",
       " 'tegur': 'fear',\n",
       " 'kecam': 'fear',\n",
       " 'cemburu': 'surprise',\n",
       " 'bitter': 'fear',\n",
       " 'ngeri': 'fear',\n",
       " 'serem': 'fear',\n",
       " 'kocak': 'fear',\n",
       " 'mantep': 'fear',\n",
       " 'miris': 'fear',\n",
       " 'ngeselin': 'fear',\n",
       " 'nyesek': 'fear',\n",
       " 'kesel': 'fear',\n",
       " 'sebel': 'fear',\n",
       " 'lebay': 'fear',\n",
       " 'phobia': 'fear',\n",
       " 'mendem': 'love',\n",
       " 'berideologi': 'love',\n",
       " 'niru': 'love',\n",
       " 'nyicip': 'love',\n",
       " 'ngerawat': 'fear',\n",
       " 'riweuh': 'anger',\n",
       " 'nmun': 'love',\n",
       " 'ngancam': 'love',\n",
       " 'bencong': 'love',\n",
       " 'anxiety': 'fear',\n",
       " 'glasses': 'love',\n",
       " 'manners': 'fear',\n",
       " 'satan': 'love',\n",
       " 'popularity': 'love',\n",
       " 'curl': 'love',\n",
       " 'impossible': 'love',\n",
       " 'mayb': 'love',\n",
       " 'sperm': 'love',\n",
       " 'nyumpah': 'love',\n",
       " 'fitnah': 'fear',\n",
       " 'hoax': 'fear',\n",
       " 'provokasi': 'fear',\n",
       " 'kebencian': 'fear',\n",
       " 'dusta': 'fear',\n",
       " 'hoaks': 'fear',\n",
       " 'kebohongan': 'fear',\n",
       " 'bohong': 'fear',\n",
       " 'rasis': 'anger',\n",
       " 'ngibul': 'fear',\n",
       " 'horror': 'fear',\n",
       " 'horor': 'fear',\n",
       " 'romance': 'fear',\n",
       " 'day6': 'fear',\n",
       " 'dokumenter': 'fear',\n",
       " 'porno': 'fear',\n",
       " 'anime': 'fear',\n",
       " 'sinetron': 'fear',\n",
       " 'drakor': 'fear',\n",
       " 'dangdut': 'fear',\n",
       " 'takut': 'fear',\n",
       " 'risau': 'fear',\n",
       " 'malu': 'fear',\n",
       " 'khawatir': 'sadness',\n",
       " 'segan': 'fear',\n",
       " 'kecewa': 'sadness',\n",
       " 'takot': 'fear',\n",
       " 'bimbang': 'sadness',\n",
       " 'takutnya': 'fear',\n",
       " 'sedih': 'sadness',\n",
       " 'panic': 'fear',\n",
       " 'loud': 'love',\n",
       " 'impressed': 'love',\n",
       " 'expected': 'love',\n",
       " 'dying': 'love',\n",
       " 'rush': 'fear',\n",
       " 'shitty': 'love',\n",
       " 'smoke': 'fear',\n",
       " 'suck': 'fear',\n",
       " 'cheap': 'fear',\n",
       " 'emo': 'fear',\n",
       " 'boring': 'fear',\n",
       " 'gelabah': 'fear',\n",
       " 'ngantok': 'fear',\n",
       " 'syok': 'joy',\n",
       " 'seronok': 'joy',\n",
       " 'busy': 'fear',\n",
       " 'serabut': 'fear',\n",
       " 'syiok': 'fear',\n",
       " 'sendu': 'fear',\n",
       " 'riang': 'joy',\n",
       " 'ceria': 'sadness',\n",
       " 'takbir': 'joy',\n",
       " 'bersuka': 'anger',\n",
       " 'emma': 'love',\n",
       " 'barakah': 'anger',\n",
       " 'telemovie': 'anger',\n",
       " 'riuh': 'anger',\n",
       " 'ria': 'joy',\n",
       " 'khutbah': 'joy',\n",
       " 'sebak': 'fear',\n",
       " 'excited': 'fear',\n",
       " 'terharu': 'surprise',\n",
       " 'terliur': 'fear',\n",
       " 'girang': 'joy',\n",
       " 'ditikung': 'love',\n",
       " 'ambis': 'anger',\n",
       " 'rafa': 'love',\n",
       " 'digangguin': 'love',\n",
       " 'nyiksa': 'anger',\n",
       " 'maruk': 'love',\n",
       " 'tamvan': 'love',\n",
       " 'pengap': 'love',\n",
       " 'iklas': 'love',\n",
       " 'puas': 'joy',\n",
       " 'muak': 'sadness',\n",
       " 'kenyang': 'fear',\n",
       " 'lega': 'fear',\n",
       " 'bosan': 'fear',\n",
       " 'berbaloi': 'fear',\n",
       " 'berpuas': 'sadness',\n",
       " 'lelah': 'sadness',\n",
       " 'bahagia': 'joy',\n",
       " 'menyenangkan': 'sadness',\n",
       " 'gelisah': 'sadness',\n",
       " 'nyaman': 'sadness',\n",
       " 'indah': 'sadness',\n",
       " 'sukses': 'sadness',\n",
       " 'sehat': 'sadness',\n",
       " 'damai': 'sadness',\n",
       " 'suka': 'joy',\n",
       " 'sukanya': 'fear',\n",
       " 'doyan': 'fear',\n",
       " 'demen': 'fear',\n",
       " 'suke': 'fear',\n",
       " 'gasuka': 'fear',\n",
       " 'gemar': 'fear',\n",
       " 'sukaa': 'fear',\n",
       " 'prefer': 'fear',\n",
       " 'happy': 'joy',\n",
       " 'hepi': 'love',\n",
       " 'wish': 'fear',\n",
       " 'nice': 'fear',\n",
       " 'cerita': 'joy',\n",
       " 'citer': 'fear',\n",
       " 'cite': 'fear',\n",
       " 'crita': 'fear',\n",
       " 'kisah': 'love',\n",
       " 'percakapan': 'joy',\n",
       " 'tweet': 'fear',\n",
       " 'drama': 'fear',\n",
       " 'lagu': 'fear',\n",
       " 'ceramah': 'joy',\n",
       " 'cinta': 'love',\n",
       " 'kebahagiaan': 'love',\n",
       " 'cintanya': 'sadness',\n",
       " 'cintaku': 'sadness',\n",
       " 'persahabatan': 'love',\n",
       " 'cintamu': 'sadness',\n",
       " 'kesabaran': 'love',\n",
       " 'dendam': 'sadness',\n",
       " 'kesedihan': 'sadness',\n",
       " 'asa': 'love',\n",
       " 'baby': 'love',\n",
       " 'daddy': 'love',\n",
       " 'mira': 'fear',\n",
       " 'princess': 'love',\n",
       " 'bella': 'love',\n",
       " 'farah': 'love',\n",
       " 'mommy': 'love',\n",
       " 'sister': 'love',\n",
       " 'mummy': 'love',\n",
       " 'lisa': 'love',\n",
       " 'love': 'love',\n",
       " 'luv': 'love',\n",
       " 'hate': 'love',\n",
       " 'thought': 'fear',\n",
       " 'mean': 'fear',\n",
       " 'want': 'fear',\n",
       " 'see': 'fear',\n",
       " 'need': 'fear',\n",
       " 'hope': 'fear',\n",
       " 'peace': 'fear',\n",
       " 'syang': 'love',\n",
       " 'noi': 'love',\n",
       " 'bilang2': 'love',\n",
       " 'syng': 'love',\n",
       " 'mut': 'love',\n",
       " 'ribbey': 'love',\n",
       " 'seneng2': 'love',\n",
       " 'butoset': 'love',\n",
       " 'manly': 'love',\n",
       " 'twet': 'love',\n",
       " 'syg': 'love',\n",
       " 'sayangg': 'love',\n",
       " 'sayang': 'love',\n",
       " 'bby': 'love',\n",
       " 'cntik': 'fear',\n",
       " 'knl': 'surprise',\n",
       " 'anon': 'fear',\n",
       " 'sistur': 'love',\n",
       " 'sayang2': 'love',\n",
       " 'bgus': 'fear',\n",
       " 'rindukn': 'love',\n",
       " 'ajeb2an': 'love',\n",
       " 'hshakjsjsbs': 'love',\n",
       " 'miliknyamencatat': 'love',\n",
       " 'p6a': 'love',\n",
       " 'ahsjahhaa': 'love',\n",
       " 'diwajibk': 'love',\n",
       " 'protese': 'love',\n",
       " 'botaqin': 'love',\n",
       " 'kruntel': 'love',\n",
       " 'rindu': 'love',\n",
       " 'sayangku': 'love',\n",
       " 'sayangkan': 'love',\n",
       " 'sayangnya': 'love',\n",
       " 'disayang': 'anger',\n",
       " 'moody': 'fear',\n",
       " 'rindukan': 'love',\n",
       " 'merindui': 'love',\n",
       " 'takutkan': 'love',\n",
       " 'banggakan': 'love',\n",
       " 'cintakan': 'love',\n",
       " 'perbuat': 'surprise',\n",
       " 'merindukan': 'love',\n",
       " 'ceraikan': 'love',\n",
       " 'jumpai': 'love',\n",
       " 'rindunya': 'fear',\n",
       " 'teringat': 'fear',\n",
       " 'rinduu': 'fear',\n",
       " 'lapar': 'fear',\n",
       " 'kempunan': 'fear',\n",
       " 'teringin': 'fear',\n",
       " 'kangen': 'fear',\n",
       " 'confuse': 'fear',\n",
       " 'stress': 'fear',\n",
       " 'letih': 'fear',\n",
       " 'penat': 'fear',\n",
       " 'stres': 'sadness',\n",
       " 'mengantuk': 'fear',\n",
       " 'tertekan': 'sadness',\n",
       " 'terganggu': 'sadness',\n",
       " 'tertipu': 'surprise',\n",
       " 'keliru': 'surprise',\n",
       " 'mengeluh': 'sadness',\n",
       " 'merosot': 'sadness',\n",
       " 'susut': 'sadness',\n",
       " 'terjebak': 'surprise',\n",
       " 'terpengaruh': 'surprise',\n",
       " 'kesal': 'sadness',\n",
       " 'terkejut': 'surprise',\n",
       " 'bersalah': 'sadness',\n",
       " 'berdosa': 'fear',\n",
       " 'dihargai': 'sadness',\n",
       " 'janggal': 'anger',\n",
       " 'resah': 'sadness',\n",
       " 'kesepian': 'sadness',\n",
       " 'gundah': 'sadness',\n",
       " 'goyah': 'sadness',\n",
       " 'disakiti': 'sadness',\n",
       " 'takjub': 'sadness',\n",
       " 'sengsara': 'sadness',\n",
       " 'seram': 'fear',\n",
       " 'menyebalkan': 'sadness',\n",
       " 'merana': 'fear',\n",
       " 'melarat': 'anger',\n",
       " 'angkuh': 'sadness',\n",
       " 'rakus': 'sadness',\n",
       " 'terpuruk': 'sadness',\n",
       " 'pengsan': 'surprise',\n",
       " 'tertido': 'fear',\n",
       " 'pitam': 'surprise',\n",
       " 'terlelap': 'surprise',\n",
       " 'terberak': 'surprise',\n",
       " 'nanges': 'fear',\n",
       " 'mengamuk': 'fear',\n",
       " 'tdoq': 'fear',\n",
       " 'termuntah': 'surprise',\n",
       " 'tidor': 'surprise',\n",
       " 'bangga': 'surprise',\n",
       " 'surprise': 'surprise',\n",
       " 'suprise': 'surprise',\n",
       " 'makan2': 'surprise',\n",
       " 'attention': 'fear',\n",
       " 'kejutan': 'surprise',\n",
       " 'assignment': 'fear',\n",
       " 'comeback': 'surprise',\n",
       " 'chance': 'fear',\n",
       " 'homework': 'surprise',\n",
       " 'appointment': 'surprise',\n",
       " 'wtf': 'surprise',\n",
       " 'huh': 'fear',\n",
       " 'seriously': 'fear',\n",
       " 'omg': 'fear',\n",
       " 'aik': 'fear',\n",
       " 'wth': 'fear',\n",
       " 'shit': 'fear',\n",
       " 'apoo': 'fear',\n",
       " 'hah': 'fear',\n",
       " 'damn': 'fear',\n",
       " 'stun': 'surprise',\n",
       " 'pinafsueun': 'love',\n",
       " 'neelehh': 'love',\n",
       " 'rudgard': 'love',\n",
       " '016344981': 'love',\n",
       " 'pramaandika': 'love',\n",
       " 'hamidibahawa': 'love',\n",
       " 'spesialers': 'love',\n",
       " 'superpignan': 'love',\n",
       " '082187486748': 'love',\n",
       " 'tertanya2': 'surprise',\n",
       " 'terperanjat': 'surprise',\n",
       " 'cubaa': 'surprise',\n",
       " 'stuju': 'surprise',\n",
       " 'stayback': 'love',\n",
       " 'cakaplah': 'surprise',\n",
       " 'melebih': 'anger',\n",
       " 'tanyaa': 'surprise',\n",
       " 'ngandung': 'surprise'}"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "results_emotion"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## propagate probabilistic\n",
    "\n",
    "\n",
    "```python\n",
    "\n",
    "def propagate_probabilistic(\n",
    "    lexicon,\n",
    "    wordvector,\n",
    "    pool_size = 10,\n",
    "    top_n = 20,\n",
    "    similarity_power = 10.0,\n",
    "    arccos = True,\n",
    "    normalization = True,\n",
    "    soft = False,\n",
    "    silent = False,\n",
    "):\n",
    "\n",
    "    \"\"\"\n",
    "    Learns polarity scores via standard label propagation from lexicon sets.\n",
    "\n",
    "    Parameters\n",
    "    ----------\n",
    "\n",
    "    lexicon: dict\n",
    "        curated lexicon from expert domain, {'label1': [str], 'label2': [str]}.\n",
    "    wordvector: object\n",
    "        wordvector interface object.\n",
    "    pool_size: int, optional (default=10)\n",
    "        pick top-pool size from each lexicons.\n",
    "    top_n: int, optional (default=20)\n",
    "        top_n for each vectors will multiple with `similarity_power`.\n",
    "    similarity_power: float, optional (default=10.0)\n",
    "        extra score for `top_n`, less will generate less bias induced but high chance unbalanced outcome.\n",
    "    arccos: bool, optional (default=True)\n",
    "        covariance distribution for embedded.dot(embedded.T). If false, covariance + 1.\n",
    "    normalization: bool, optional (default=True)\n",
    "        normalize word vectors using L2 norm. L2 is good to penalize skewed vectors.\n",
    "    soft: bool, optional (default=False)\n",
    "        if True, a word not in the dictionary will be replaced with nearest jarowrinkler ratio.\n",
    "        if False, it will throw an exception if a word not in the dictionary.\n",
    "    silent: bool, optional (default=False)\n",
    "        if True, will not print any logs.\n",
    "\n",
    "    Returns\n",
    "    -------\n",
    "    tuple: (labels[argmax(scores), axis = 1], scores, labels)\n",
    "    \"\"\"\n",
    "\n",
    "```"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "populating nearest words from wordvector\n",
      "populating vectors from populated nearest words\n",
      "propagating probabilistic from populated vectors \n",
      "\n",
      "CPU times: user 5.64 s, sys: 2.05 s, total: 7.68 s\n",
      "Wall time: 1.29 s\n"
     ]
    }
   ],
   "source": [
    "%%time\n",
    "\n",
    "results_emotion, scores_emotion, labels_emotion = malaya.lexicon.propagate_probabilistic(emotion_lexicon, \n",
    "                                                                             wordvector,\n",
    "                                                                             pool_size = 10)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(array(['anger', 'fear', 'joy', 'love', 'sadness', 'surprise'], dtype='<U8'),\n",
       " array([315,  66,  10,  21,  28,  12]))"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.unique(list(results_emotion.values()), return_counts = True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'sebal': 'anger',\n",
       " 'gesture': 'anger',\n",
       " 'se7': 'anger',\n",
       " 'ziraa': 'anger',\n",
       " 'mantepp': 'anger',\n",
       " 'mesem': 'anger',\n",
       " 'nggapapa': 'anger',\n",
       " 'maen2': 'anger',\n",
       " 'gacocok': 'anger',\n",
       " 'jeongwoo': 'anger',\n",
       " 'bergelora': 'anger',\n",
       " 'mereda': 'anger',\n",
       " 'skeptis': 'anger',\n",
       " 'gebus': 'anger',\n",
       " 'tyrion': 'anger',\n",
       " 'memuncak': 'anger',\n",
       " 'mewabah': 'anger',\n",
       " 'mengenaskan': 'anger',\n",
       " 'kesasar': 'anger',\n",
       " 'kepedean': 'anger',\n",
       " 'annoying': 'anger',\n",
       " 'awkward': 'fear',\n",
       " 'scary': 'fear',\n",
       " 'handsome': 'anger',\n",
       " 'nervous': 'fear',\n",
       " 'cringe': 'fear',\n",
       " 'menyampah': 'fear',\n",
       " 'kelakar': 'anger',\n",
       " 'cute': 'anger',\n",
       " 'cuak': 'fear',\n",
       " 'bodoh': 'anger',\n",
       " 'bangang': 'anger',\n",
       " 'bebal': 'anger',\n",
       " 'bodo': 'anger',\n",
       " 'noob': 'anger',\n",
       " 'bengap': 'anger',\n",
       " 'celaka': 'anger',\n",
       " 'biadap': 'anger',\n",
       " 'pukimak': 'anger',\n",
       " 'berang': 'anger',\n",
       " 'buru': 'anger',\n",
       " 'nerus': 'anger',\n",
       " 'kangsar': 'anger',\n",
       " 'lipis': 'anger',\n",
       " 'pilah': 'anger',\n",
       " 'besut': 'anger',\n",
       " 'krai': 'anger',\n",
       " 'klawang': 'anger',\n",
       " 'ketil': 'anger',\n",
       " 'amuk': 'anger',\n",
       " 'mbatin': 'anger',\n",
       " 'sebarin': 'anger',\n",
       " 'sebarisan': 'anger',\n",
       " 'ngalami': 'anger',\n",
       " 'tikt': 'anger',\n",
       " 'diharga': 'anger',\n",
       " 'threesome': 'anger',\n",
       " 'shizuka': 'anger',\n",
       " 'bokondini': 'anger',\n",
       " 'mendidih': 'anger',\n",
       " 'mengental': 'anger',\n",
       " 'sebati': 'anger',\n",
       " 'mengembang': 'anger',\n",
       " 'layu': 'anger',\n",
       " 'kecoklatan': 'anger',\n",
       " 'matang': 'anger',\n",
       " 'meresap': 'anger',\n",
       " 'mengering': 'anger',\n",
       " 'direbus': 'anger',\n",
       " 'pengecut': 'anger',\n",
       " 'bajingan': 'anger',\n",
       " 'pembohong': 'anger',\n",
       " 'pecundang': 'anger',\n",
       " 'dungu': 'anger',\n",
       " 'pemberani': 'anger',\n",
       " 'negarawan': 'anger',\n",
       " 'jahil': 'anger',\n",
       " 'biadab': 'anger',\n",
       " 'provokator': 'anger',\n",
       " 'bengang': 'anger',\n",
       " 'menyirap': 'fear',\n",
       " 'meluat': 'anger',\n",
       " 'frust': 'fear',\n",
       " 'rimas': 'fear',\n",
       " 'annoyed': 'fear',\n",
       " 'lonely': 'fear',\n",
       " 'berdukacita': 'anger',\n",
       " 'menyakitimu': 'anger',\n",
       " 'bersinggungan': 'anger',\n",
       " 'bermesra': 'anger',\n",
       " 'meridhoi': 'anger',\n",
       " 'menyelubungi': 'anger',\n",
       " 'empukk': 'anger',\n",
       " 'berserban': 'anger',\n",
       " 'diracuni': 'anger',\n",
       " 'dibayangi': 'anger',\n",
       " 'jengkel': 'anger',\n",
       " 'gugup': 'anger',\n",
       " 'dibiasain': 'anger',\n",
       " 'mubazir': 'anger',\n",
       " 'amnesia': 'anger',\n",
       " 'psikopat': 'anger',\n",
       " 'gumoh': 'anger',\n",
       " 'diurusin': 'anger',\n",
       " 'ngangenin': 'anger',\n",
       " 'purging': 'anger',\n",
       " 'babi': 'anger',\n",
       " 'sial': 'anger',\n",
       " 'kimak': 'anger',\n",
       " 'anjing': 'anger',\n",
       " 'pundek': 'anger',\n",
       " 'cibai': 'anger',\n",
       " 'setan': 'anger',\n",
       " 'lembu': 'anger',\n",
       " 'pedar': 'anger',\n",
       " 'sanwya': 'anger',\n",
       " 'qabaya': 'anger',\n",
       " '5pac': 'anger',\n",
       " 'wa082336409906': 'anger',\n",
       " 'mpibg': 'anger',\n",
       " 'honachahthu': 'anger',\n",
       " 'unieleven': 'anger',\n",
       " 'mengepilkan': 'anger',\n",
       " 'ciknorzaidi': 'anger',\n",
       " 'benci': 'anger',\n",
       " 'jijik': 'fear',\n",
       " 'kagum': 'surprise',\n",
       " 'geli': 'anger',\n",
       " 'insecure': 'fear',\n",
       " 'geram': 'anger',\n",
       " 'respect': 'anger',\n",
       " 'jealous': 'fear',\n",
       " 'marah': 'anger',\n",
       " 'maki': 'anger',\n",
       " 'merajuk': 'anger',\n",
       " 'marah2': 'anger',\n",
       " 'perli': 'anger',\n",
       " 'jeles': 'fear',\n",
       " 'tegur': 'anger',\n",
       " 'kecam': 'anger',\n",
       " 'cemburu': 'surprise',\n",
       " 'bitter': 'anger',\n",
       " 'ngeri': 'fear',\n",
       " 'serem': 'anger',\n",
       " 'kocak': 'anger',\n",
       " 'mantep': 'anger',\n",
       " 'miris': 'fear',\n",
       " 'ngeselin': 'anger',\n",
       " 'nyesek': 'anger',\n",
       " 'kesel': 'fear',\n",
       " 'sebel': 'fear',\n",
       " 'lebay': 'anger',\n",
       " 'phobia': 'fear',\n",
       " 'mendem': 'anger',\n",
       " 'berideologi': 'anger',\n",
       " 'niru': 'anger',\n",
       " 'nyicip': 'anger',\n",
       " 'ngerawat': 'anger',\n",
       " 'riweuh': 'anger',\n",
       " 'nmun': 'anger',\n",
       " 'ngancam': 'anger',\n",
       " 'bencong': 'anger',\n",
       " 'anxiety': 'fear',\n",
       " 'glasses': 'anger',\n",
       " 'manners': 'anger',\n",
       " 'satan': 'anger',\n",
       " 'popularity': 'anger',\n",
       " 'curl': 'anger',\n",
       " 'impossible': 'anger',\n",
       " 'mayb': 'anger',\n",
       " 'sperm': 'anger',\n",
       " 'nyumpah': 'anger',\n",
       " 'fitnah': 'fear',\n",
       " 'hoax': 'anger',\n",
       " 'provokasi': 'anger',\n",
       " 'kebencian': 'anger',\n",
       " 'dusta': 'anger',\n",
       " 'hoaks': 'anger',\n",
       " 'kebohongan': 'anger',\n",
       " 'bohong': 'anger',\n",
       " 'rasis': 'anger',\n",
       " 'ngibul': 'anger',\n",
       " 'horror': 'fear',\n",
       " 'horor': 'fear',\n",
       " 'romance': 'anger',\n",
       " 'day6': 'anger',\n",
       " 'dokumenter': 'anger',\n",
       " 'porno': 'anger',\n",
       " 'anime': 'anger',\n",
       " 'sinetron': 'anger',\n",
       " 'drakor': 'anger',\n",
       " 'dangdut': 'anger',\n",
       " 'takut': 'fear',\n",
       " 'risau': 'fear',\n",
       " 'malu': 'fear',\n",
       " 'khawatir': 'sadness',\n",
       " 'segan': 'fear',\n",
       " 'kecewa': 'sadness',\n",
       " 'takot': 'fear',\n",
       " 'bimbang': 'sadness',\n",
       " 'takutnya': 'anger',\n",
       " 'sedih': 'sadness',\n",
       " 'panic': 'fear',\n",
       " 'loud': 'anger',\n",
       " 'impressed': 'anger',\n",
       " 'expected': 'anger',\n",
       " 'dying': 'anger',\n",
       " 'rush': 'anger',\n",
       " 'shitty': 'anger',\n",
       " 'smoke': 'anger',\n",
       " 'suck': 'anger',\n",
       " 'cheap': 'anger',\n",
       " 'emo': 'fear',\n",
       " 'boring': 'fear',\n",
       " 'gelabah': 'fear',\n",
       " 'ngantok': 'fear',\n",
       " 'syok': 'joy',\n",
       " 'seronok': 'joy',\n",
       " 'busy': 'fear',\n",
       " 'serabut': 'fear',\n",
       " 'syiok': 'anger',\n",
       " 'sendu': 'fear',\n",
       " 'riang': 'joy',\n",
       " 'ceria': 'joy',\n",
       " 'takbir': 'anger',\n",
       " 'bersuka': 'anger',\n",
       " 'emma': 'love',\n",
       " 'barakah': 'anger',\n",
       " 'telemovie': 'anger',\n",
       " 'riuh': 'anger',\n",
       " 'ria': 'anger',\n",
       " 'khutbah': 'anger',\n",
       " 'sebak': 'fear',\n",
       " 'excited': 'fear',\n",
       " 'terharu': 'surprise',\n",
       " 'terliur': 'fear',\n",
       " 'girang': 'joy',\n",
       " 'ditikung': 'anger',\n",
       " 'ambis': 'anger',\n",
       " 'rafa': 'anger',\n",
       " 'digangguin': 'anger',\n",
       " 'nyiksa': 'anger',\n",
       " 'maruk': 'anger',\n",
       " 'tamvan': 'anger',\n",
       " 'pengap': 'anger',\n",
       " 'iklas': 'anger',\n",
       " 'puas': 'joy',\n",
       " 'muak': 'fear',\n",
       " 'kenyang': 'fear',\n",
       " 'lega': 'fear',\n",
       " 'bosan': 'fear',\n",
       " 'berbaloi': 'fear',\n",
       " 'berpuas': 'sadness',\n",
       " 'lelah': 'sadness',\n",
       " 'bahagia': 'joy',\n",
       " 'menyenangkan': 'sadness',\n",
       " 'gelisah': 'sadness',\n",
       " 'nyaman': 'sadness',\n",
       " 'indah': 'sadness',\n",
       " 'sukses': 'anger',\n",
       " 'sehat': 'sadness',\n",
       " 'damai': 'sadness',\n",
       " 'suka': 'joy',\n",
       " 'sukanya': 'anger',\n",
       " 'doyan': 'anger',\n",
       " 'demen': 'anger',\n",
       " 'suke': 'anger',\n",
       " 'gasuka': 'anger',\n",
       " 'gemar': 'anger',\n",
       " 'sukaa': 'anger',\n",
       " 'prefer': 'anger',\n",
       " 'happy': 'joy',\n",
       " 'hepi': 'anger',\n",
       " 'wish': 'anger',\n",
       " 'nice': 'fear',\n",
       " 'cerita': 'joy',\n",
       " 'citer': 'fear',\n",
       " 'cite': 'fear',\n",
       " 'crita': 'anger',\n",
       " 'kisah': 'love',\n",
       " 'percakapan': 'anger',\n",
       " 'tweet': 'fear',\n",
       " 'drama': 'anger',\n",
       " 'lagu': 'anger',\n",
       " 'ceramah': 'anger',\n",
       " 'cinta': 'love',\n",
       " 'kebahagiaan': 'anger',\n",
       " 'cintanya': 'anger',\n",
       " 'cintaku': 'anger',\n",
       " 'persahabatan': 'anger',\n",
       " 'cintamu': 'anger',\n",
       " 'kesabaran': 'anger',\n",
       " 'dendam': 'sadness',\n",
       " 'kesedihan': 'anger',\n",
       " 'asa': 'sadness',\n",
       " 'baby': 'love',\n",
       " 'daddy': 'love',\n",
       " 'mira': 'love',\n",
       " 'princess': 'anger',\n",
       " 'bella': 'love',\n",
       " 'farah': 'love',\n",
       " 'mommy': 'love',\n",
       " 'sister': 'love',\n",
       " 'mummy': 'love',\n",
       " 'lisa': 'love',\n",
       " 'love': 'love',\n",
       " 'luv': 'love',\n",
       " 'hate': 'anger',\n",
       " 'thought': 'anger',\n",
       " 'mean': 'anger',\n",
       " 'want': 'anger',\n",
       " 'see': 'anger',\n",
       " 'need': 'anger',\n",
       " 'hope': 'anger',\n",
       " 'peace': 'anger',\n",
       " 'syang': 'love',\n",
       " 'noi': 'anger',\n",
       " 'bilang2': 'anger',\n",
       " 'syng': 'anger',\n",
       " 'mut': 'anger',\n",
       " 'ribbey': 'anger',\n",
       " 'seneng2': 'anger',\n",
       " 'butoset': 'anger',\n",
       " 'manly': 'anger',\n",
       " 'twet': 'anger',\n",
       " 'syg': 'love',\n",
       " 'sayangg': 'anger',\n",
       " 'sayang': 'love',\n",
       " 'bby': 'anger',\n",
       " 'cntik': 'anger',\n",
       " 'knl': 'anger',\n",
       " 'anon': 'anger',\n",
       " 'sistur': 'anger',\n",
       " 'sayang2': 'anger',\n",
       " 'bgus': 'anger',\n",
       " 'rindukn': 'love',\n",
       " 'ajeb2an': 'anger',\n",
       " 'hshakjsjsbs': 'anger',\n",
       " 'miliknyamencatat': 'anger',\n",
       " 'p6a': 'anger',\n",
       " 'ahsjahhaa': 'anger',\n",
       " 'diwajibk': 'anger',\n",
       " 'protese': 'anger',\n",
       " 'botaqin': 'anger',\n",
       " 'kruntel': 'anger',\n",
       " 'rindu': 'love',\n",
       " 'sayangku': 'anger',\n",
       " 'sayangkan': 'anger',\n",
       " 'sayangnya': 'love',\n",
       " 'disayang': 'anger',\n",
       " 'moody': 'fear',\n",
       " 'rindukan': 'love',\n",
       " 'merindui': 'anger',\n",
       " 'takutkan': 'anger',\n",
       " 'banggakan': 'anger',\n",
       " 'cintakan': 'anger',\n",
       " 'perbuat': 'anger',\n",
       " 'merindukan': 'anger',\n",
       " 'ceraikan': 'anger',\n",
       " 'jumpai': 'anger',\n",
       " 'rindunya': 'fear',\n",
       " 'teringat': 'fear',\n",
       " 'rinduu': 'fear',\n",
       " 'lapar': 'fear',\n",
       " 'kempunan': 'fear',\n",
       " 'teringin': 'fear',\n",
       " 'kangen': 'fear',\n",
       " 'confuse': 'fear',\n",
       " 'stress': 'sadness',\n",
       " 'letih': 'fear',\n",
       " 'penat': 'fear',\n",
       " 'stres': 'sadness',\n",
       " 'mengantuk': 'fear',\n",
       " 'tertekan': 'sadness',\n",
       " 'terganggu': 'sadness',\n",
       " 'tertipu': 'surprise',\n",
       " 'keliru': 'sadness',\n",
       " 'mengeluh': 'sadness',\n",
       " 'merosot': 'anger',\n",
       " 'susut': 'anger',\n",
       " 'terjebak': 'sadness',\n",
       " 'terpengaruh': 'surprise',\n",
       " 'kesal': 'sadness',\n",
       " 'terkejut': 'surprise',\n",
       " 'bersalah': 'sadness',\n",
       " 'berdosa': 'fear',\n",
       " 'dihargai': 'sadness',\n",
       " 'janggal': 'anger',\n",
       " 'resah': 'sadness',\n",
       " 'kesepian': 'sadness',\n",
       " 'gundah': 'anger',\n",
       " 'goyah': 'anger',\n",
       " 'disakiti': 'anger',\n",
       " 'takjub': 'anger',\n",
       " 'sengsara': 'sadness',\n",
       " 'seram': 'fear',\n",
       " 'menyebalkan': 'anger',\n",
       " 'merana': 'sadness',\n",
       " 'melarat': 'anger',\n",
       " 'angkuh': 'anger',\n",
       " 'rakus': 'anger',\n",
       " 'terpuruk': 'anger',\n",
       " 'pengsan': 'surprise',\n",
       " 'tertido': 'anger',\n",
       " 'pitam': 'anger',\n",
       " 'terlelap': 'anger',\n",
       " 'terberak': 'anger',\n",
       " 'nanges': 'anger',\n",
       " 'mengamuk': 'anger',\n",
       " 'tdoq': 'anger',\n",
       " 'termuntah': 'anger',\n",
       " 'tidor': 'anger',\n",
       " 'bangga': 'surprise',\n",
       " 'surprise': 'surprise',\n",
       " 'suprise': 'anger',\n",
       " 'makan2': 'anger',\n",
       " 'attention': 'anger',\n",
       " 'kejutan': 'anger',\n",
       " 'assignment': 'fear',\n",
       " 'comeback': 'anger',\n",
       " 'chance': 'fear',\n",
       " 'homework': 'anger',\n",
       " 'appointment': 'anger',\n",
       " 'wtf': 'surprise',\n",
       " 'huh': 'anger',\n",
       " 'seriously': 'anger',\n",
       " 'omg': 'anger',\n",
       " 'aik': 'anger',\n",
       " 'wth': 'anger',\n",
       " 'shit': 'anger',\n",
       " 'apoo': 'fear',\n",
       " 'hah': 'anger',\n",
       " 'damn': 'anger',\n",
       " 'stun': 'surprise',\n",
       " 'pinafsueun': 'anger',\n",
       " 'neelehh': 'anger',\n",
       " 'rudgard': 'anger',\n",
       " '016344981': 'anger',\n",
       " 'pramaandika': 'anger',\n",
       " 'hamidibahawa': 'anger',\n",
       " 'spesialers': 'anger',\n",
       " 'superpignan': 'anger',\n",
       " '082187486748': 'anger',\n",
       " 'tertanya2': 'surprise',\n",
       " 'terperanjat': 'anger',\n",
       " 'cubaa': 'anger',\n",
       " 'stuju': 'anger',\n",
       " 'stayback': 'anger',\n",
       " 'cakaplah': 'anger',\n",
       " 'melebih': 'anger',\n",
       " 'tanyaa': 'anger',\n",
       " 'ngandung': 'anger'}"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "results_emotion"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## propagate graph\n",
    "\n",
    "```python\n",
    "\n",
    "def propagate_graph(\n",
    "    lexicon,\n",
    "    wordvector,\n",
    "    pool_size = 10,\n",
    "    top_n = 20,\n",
    "    similarity_power = 10.0,\n",
    "    normalization = True,\n",
    "    soft = False,\n",
    "    silent = False,\n",
    "):\n",
    "\n",
    "    \"\"\"\n",
    "    Graph propagation method dapted from Velikovich, Leonid, et al. \"The viability of web-derived polarity lexicons.\" http://www.aclweb.org/anthology/N10-1119\n",
    "\n",
    "    Parameters\n",
    "    ----------\n",
    "\n",
    "    lexicon: dict\n",
    "        curated lexicon from expert domain, {'label1': [str], 'label2': [str]}.\n",
    "    wordvector: object\n",
    "        wordvector interface object.\n",
    "    pool_size: int, optional (default=10)\n",
    "        pick top-pool size from each lexicons.\n",
    "    top_n: int, optional (default=20)\n",
    "        top_n for each vectors will multiple with `similarity_power`.\n",
    "    similarity_power: float, optional (default=10.0)\n",
    "        extra score for `top_n`, less will generate less bias induced but high chance unbalanced outcome.\n",
    "    normalization: bool, optional (default=True)\n",
    "        normalize word vectors using L2 norm. L2 is good to penalize skewed vectors.\n",
    "    soft: bool, optional (default=False)\n",
    "        if True, a word not in the dictionary will be replaced with nearest jarowrinkler ratio.\n",
    "        if False, it will throw an exception if a word not in the dictionary.\n",
    "    silent: bool, optional (default=False)\n",
    "        if True, will not print any logs.\n",
    "\n",
    "    Returns\n",
    "    -------\n",
    "    tuple: (labels[argmax(scores), axis = 1], scores, labels)\n",
    "    \"\"\"\n",
    "```"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "populating nearest words from wordvector\n",
      "populating vectors from populated nearest words\n",
      "propagate graph from populated nearest words\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "100%|██████████| 452/452 [00:00<00:00, 1830.24it/s]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "CPU times: user 16.5 s, sys: 2.2 s, total: 18.7 s\n",
      "Wall time: 11.8 s\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "\n"
     ]
    }
   ],
   "source": [
    "%%time\n",
    "\n",
    "results_emotion, scores_emotion, labels_emotion = malaya.lexicon.propagate_graph(emotion_lexicon, \n",
    "                                                                             wordvector,\n",
    "                                                                             pool_size = 10)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(array(['anger', 'fear', 'joy', 'love', 'sadness', 'surprise'], dtype='<U8'),\n",
       " array([149,  61,  49,  69,  46,  78]))"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.unique(list(results_emotion.values()), return_counts = True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'sebal': 'anger',\n",
       " 'gesture': 'fear',\n",
       " 'se7': 'anger',\n",
       " 'ziraa': 'anger',\n",
       " 'mantepp': 'anger',\n",
       " 'mesem': 'fear',\n",
       " 'nggapapa': 'anger',\n",
       " 'maen2': 'anger',\n",
       " 'gacocok': 'fear',\n",
       " 'jeongwoo': 'anger',\n",
       " 'bergelora': 'anger',\n",
       " 'mereda': 'anger',\n",
       " 'skeptis': 'anger',\n",
       " 'gebus': 'love',\n",
       " 'tyrion': 'fear',\n",
       " 'memuncak': 'anger',\n",
       " 'mewabah': 'anger',\n",
       " 'mengenaskan': 'anger',\n",
       " 'kesasar': 'love',\n",
       " 'kepedean': 'anger',\n",
       " 'annoying': 'anger',\n",
       " 'awkward': 'fear',\n",
       " 'scary': 'fear',\n",
       " 'handsome': 'love',\n",
       " 'nervous': 'fear',\n",
       " 'cringe': 'anger',\n",
       " 'menyampah': 'anger',\n",
       " 'kelakar': 'anger',\n",
       " 'cute': 'love',\n",
       " 'cuak': 'fear',\n",
       " 'bodoh': 'anger',\n",
       " 'bangang': 'anger',\n",
       " 'bebal': 'anger',\n",
       " 'bodo': 'anger',\n",
       " 'noob': 'anger',\n",
       " 'bengap': 'anger',\n",
       " 'celaka': 'anger',\n",
       " 'biadap': 'anger',\n",
       " 'pukimak': 'anger',\n",
       " 'berang': 'anger',\n",
       " 'buru': 'joy',\n",
       " 'nerus': 'anger',\n",
       " 'kangsar': 'fear',\n",
       " 'lipis': 'anger',\n",
       " 'pilah': 'fear',\n",
       " 'besut': 'anger',\n",
       " 'krai': 'anger',\n",
       " 'klawang': 'anger',\n",
       " 'ketil': 'anger',\n",
       " 'amuk': 'anger',\n",
       " 'mbatin': 'love',\n",
       " 'sebarin': 'anger',\n",
       " 'sebarisan': 'fear',\n",
       " 'ngalami': 'joy',\n",
       " 'tikt': 'anger',\n",
       " 'diharga': 'anger',\n",
       " 'threesome': 'anger',\n",
       " 'shizuka': 'anger',\n",
       " 'bokondini': 'anger',\n",
       " 'mendidih': 'anger',\n",
       " 'mengental': 'anger',\n",
       " 'sebati': 'surprise',\n",
       " 'mengembang': 'anger',\n",
       " 'layu': 'surprise',\n",
       " 'kecoklatan': 'anger',\n",
       " 'matang': 'sadness',\n",
       " 'meresap': 'surprise',\n",
       " 'mengering': 'anger',\n",
       " 'direbus': 'anger',\n",
       " 'pengecut': 'anger',\n",
       " 'bajingan': 'fear',\n",
       " 'pembohong': 'fear',\n",
       " 'pecundang': 'fear',\n",
       " 'dungu': 'fear',\n",
       " 'pemberani': 'anger',\n",
       " 'negarawan': 'anger',\n",
       " 'jahil': 'anger',\n",
       " 'biadab': 'fear',\n",
       " 'provokator': 'fear',\n",
       " 'bengang': 'anger',\n",
       " 'menyirap': 'joy',\n",
       " 'meluat': 'surprise',\n",
       " 'frust': 'surprise',\n",
       " 'rimas': 'sadness',\n",
       " 'annoyed': 'anger',\n",
       " 'lonely': 'love',\n",
       " 'berdukacita': 'anger',\n",
       " 'menyakitimu': 'surprise',\n",
       " 'bersinggungan': 'anger',\n",
       " 'bermesra': 'anger',\n",
       " 'meridhoi': 'love',\n",
       " 'menyelubungi': 'anger',\n",
       " 'empukk': 'anger',\n",
       " 'berserban': 'anger',\n",
       " 'diracuni': 'anger',\n",
       " 'dibayangi': 'fear',\n",
       " 'jengkel': 'anger',\n",
       " 'gugup': 'anger',\n",
       " 'dibiasain': 'joy',\n",
       " 'mubazir': 'anger',\n",
       " 'amnesia': 'fear',\n",
       " 'psikopat': 'fear',\n",
       " 'gumoh': 'anger',\n",
       " 'diurusin': 'fear',\n",
       " 'ngangenin': 'joy',\n",
       " 'purging': 'joy',\n",
       " 'babi': 'anger',\n",
       " 'sial': 'surprise',\n",
       " 'kimak': 'surprise',\n",
       " 'anjing': 'fear',\n",
       " 'pundek': 'surprise',\n",
       " 'cibai': 'surprise',\n",
       " 'setan': 'fear',\n",
       " 'lembu': 'anger',\n",
       " 'pedar': 'anger',\n",
       " 'sanwya': 'love',\n",
       " 'qabaya': 'love',\n",
       " '5pac': 'love',\n",
       " 'wa082336409906': 'love',\n",
       " 'mpibg': 'love',\n",
       " 'honachahthu': 'love',\n",
       " 'unieleven': 'love',\n",
       " 'mengepilkan': 'surprise',\n",
       " 'ciknorzaidi': 'love',\n",
       " 'benci': 'anger',\n",
       " 'jijik': 'fear',\n",
       " 'kagum': 'surprise',\n",
       " 'geli': 'fear',\n",
       " 'insecure': 'sadness',\n",
       " 'geram': 'sadness',\n",
       " 'respect': 'love',\n",
       " 'jealous': 'anger',\n",
       " 'marah': 'anger',\n",
       " 'maki': 'surprise',\n",
       " 'merajuk': 'surprise',\n",
       " 'marah2': 'surprise',\n",
       " 'perli': 'joy',\n",
       " 'jeles': 'love',\n",
       " 'tegur': 'surprise',\n",
       " 'kecam': 'fear',\n",
       " 'cemburu': 'sadness',\n",
       " 'bitter': 'surprise',\n",
       " 'ngeri': 'fear',\n",
       " 'serem': 'anger',\n",
       " 'kocak': 'fear',\n",
       " 'mantep': 'fear',\n",
       " 'miris': 'anger',\n",
       " 'ngeselin': 'fear',\n",
       " 'nyesek': 'fear',\n",
       " 'kesel': 'sadness',\n",
       " 'sebel': 'anger',\n",
       " 'lebay': 'fear',\n",
       " 'phobia': 'fear',\n",
       " 'mendem': 'joy',\n",
       " 'berideologi': 'anger',\n",
       " 'niru': 'anger',\n",
       " 'nyicip': 'anger',\n",
       " 'ngerawat': 'love',\n",
       " 'riweuh': 'joy',\n",
       " 'nmun': 'anger',\n",
       " 'ngancam': 'surprise',\n",
       " 'bencong': 'fear',\n",
       " 'anxiety': 'fear',\n",
       " 'glasses': 'love',\n",
       " 'manners': 'fear',\n",
       " 'satan': 'fear',\n",
       " 'popularity': 'love',\n",
       " 'curl': 'surprise',\n",
       " 'impossible': 'fear',\n",
       " 'mayb': 'love',\n",
       " 'sperm': 'anger',\n",
       " 'nyumpah': 'fear',\n",
       " 'fitnah': 'fear',\n",
       " 'hoax': 'fear',\n",
       " 'provokasi': 'anger',\n",
       " 'kebencian': 'love',\n",
       " 'dusta': 'love',\n",
       " 'hoaks': 'anger',\n",
       " 'kebohongan': 'love',\n",
       " 'bohong': 'anger',\n",
       " 'rasis': 'sadness',\n",
       " 'ngibul': 'anger',\n",
       " 'horror': 'fear',\n",
       " 'horor': 'joy',\n",
       " 'romance': 'love',\n",
       " 'day6': 'anger',\n",
       " 'dokumenter': 'anger',\n",
       " 'porno': 'anger',\n",
       " 'anime': 'joy',\n",
       " 'sinetron': 'joy',\n",
       " 'drakor': 'joy',\n",
       " 'dangdut': 'joy',\n",
       " 'takut': 'fear',\n",
       " 'risau': 'surprise',\n",
       " 'malu': 'fear',\n",
       " 'khawatir': 'sadness',\n",
       " 'segan': 'anger',\n",
       " 'kecewa': 'sadness',\n",
       " 'takot': 'surprise',\n",
       " 'bimbang': 'sadness',\n",
       " 'takutnya': 'love',\n",
       " 'sedih': 'sadness',\n",
       " 'panic': 'fear',\n",
       " 'loud': 'love',\n",
       " 'impressed': 'surprise',\n",
       " 'expected': 'surprise',\n",
       " 'dying': 'joy',\n",
       " 'rush': 'surprise',\n",
       " 'shitty': 'anger',\n",
       " 'smoke': 'surprise',\n",
       " 'suck': 'love',\n",
       " 'cheap': 'fear',\n",
       " 'emo': 'anger',\n",
       " 'boring': 'joy',\n",
       " 'gelabah': 'surprise',\n",
       " 'ngantok': 'surprise',\n",
       " 'syok': 'joy',\n",
       " 'seronok': 'joy',\n",
       " 'busy': 'joy',\n",
       " 'serabut': 'sadness',\n",
       " 'syiok': 'surprise',\n",
       " 'sendu': 'joy',\n",
       " 'riang': 'joy',\n",
       " 'ceria': 'joy',\n",
       " 'takbir': 'joy',\n",
       " 'bersuka': 'love',\n",
       " 'emma': 'love',\n",
       " 'barakah': 'anger',\n",
       " 'telemovie': 'joy',\n",
       " 'riuh': 'surprise',\n",
       " 'ria': 'joy',\n",
       " 'khutbah': 'joy',\n",
       " 'sebak': 'sadness',\n",
       " 'excited': 'joy',\n",
       " 'terharu': 'surprise',\n",
       " 'terliur': 'surprise',\n",
       " 'girang': 'joy',\n",
       " 'ditikung': 'anger',\n",
       " 'ambis': 'anger',\n",
       " 'rafa': 'anger',\n",
       " 'digangguin': 'anger',\n",
       " 'nyiksa': 'fear',\n",
       " 'maruk': 'love',\n",
       " 'tamvan': 'anger',\n",
       " 'pengap': 'anger',\n",
       " 'iklas': 'love',\n",
       " 'puas': 'joy',\n",
       " 'muak': 'sadness',\n",
       " 'kenyang': 'joy',\n",
       " 'lega': 'joy',\n",
       " 'bosan': 'love',\n",
       " 'berbaloi': 'sadness',\n",
       " 'berpuas': 'sadness',\n",
       " 'lelah': 'sadness',\n",
       " 'bahagia': 'joy',\n",
       " 'menyenangkan': 'sadness',\n",
       " 'gelisah': 'sadness',\n",
       " 'nyaman': 'sadness',\n",
       " 'indah': 'sadness',\n",
       " 'sukses': 'sadness',\n",
       " 'sehat': 'sadness',\n",
       " 'damai': 'sadness',\n",
       " 'suka': 'joy',\n",
       " 'sukanya': 'love',\n",
       " 'doyan': 'fear',\n",
       " 'demen': 'anger',\n",
       " 'suke': 'love',\n",
       " 'gasuka': 'love',\n",
       " 'gemar': 'love',\n",
       " 'sukaa': 'love',\n",
       " 'prefer': 'love',\n",
       " 'happy': 'joy',\n",
       " 'hepi': 'love',\n",
       " 'wish': 'love',\n",
       " 'nice': 'surprise',\n",
       " 'cerita': 'joy',\n",
       " 'citer': 'surprise',\n",
       " 'cite': 'surprise',\n",
       " 'crita': 'surprise',\n",
       " 'kisah': 'love',\n",
       " 'percakapan': 'fear',\n",
       " 'tweet': 'love',\n",
       " 'drama': 'joy',\n",
       " 'lagu': 'joy',\n",
       " 'ceramah': 'surprise',\n",
       " 'cinta': 'love',\n",
       " 'kebahagiaan': 'sadness',\n",
       " 'cintanya': 'anger',\n",
       " 'cintaku': 'sadness',\n",
       " 'persahabatan': 'joy',\n",
       " 'cintamu': 'anger',\n",
       " 'kesabaran': 'fear',\n",
       " 'dendam': 'sadness',\n",
       " 'kesedihan': 'sadness',\n",
       " 'asa': 'sadness',\n",
       " 'baby': 'love',\n",
       " 'daddy': 'love',\n",
       " 'mira': 'love',\n",
       " 'princess': 'love',\n",
       " 'bella': 'joy',\n",
       " 'farah': 'surprise',\n",
       " 'mommy': 'love',\n",
       " 'sister': 'surprise',\n",
       " 'mummy': 'love',\n",
       " 'lisa': 'joy',\n",
       " 'love': 'love',\n",
       " 'luv': 'love',\n",
       " 'hate': 'surprise',\n",
       " 'thought': 'surprise',\n",
       " 'mean': 'surprise',\n",
       " 'want': 'joy',\n",
       " 'see': 'surprise',\n",
       " 'need': 'joy',\n",
       " 'hope': 'surprise',\n",
       " 'peace': 'anger',\n",
       " 'syang': 'love',\n",
       " 'noi': 'fear',\n",
       " 'bilang2': 'anger',\n",
       " 'syng': 'anger',\n",
       " 'mut': 'fear',\n",
       " 'ribbey': 'anger',\n",
       " 'seneng2': 'anger',\n",
       " 'butoset': 'anger',\n",
       " 'manly': 'anger',\n",
       " 'twet': 'anger',\n",
       " 'syg': 'love',\n",
       " 'sayangg': 'love',\n",
       " 'sayang': 'love',\n",
       " 'bby': 'surprise',\n",
       " 'cntik': 'anger',\n",
       " 'knl': 'surprise',\n",
       " 'anon': 'anger',\n",
       " 'sistur': 'surprise',\n",
       " 'sayang2': 'surprise',\n",
       " 'bgus': 'anger',\n",
       " 'rindukn': 'love',\n",
       " 'ajeb2an': 'surprise',\n",
       " 'hshakjsjsbs': 'anger',\n",
       " 'miliknyamencatat': 'anger',\n",
       " 'p6a': 'anger',\n",
       " 'ahsjahhaa': 'surprise',\n",
       " 'diwajibk': 'anger',\n",
       " 'protese': 'surprise',\n",
       " 'botaqin': 'surprise',\n",
       " 'kruntel': 'anger',\n",
       " 'rindu': 'love',\n",
       " 'sayangku': 'anger',\n",
       " 'sayangkan': 'love',\n",
       " 'sayangnya': 'fear',\n",
       " 'disayang': 'joy',\n",
       " 'moody': 'surprise',\n",
       " 'rindukan': 'love',\n",
       " 'merindui': 'surprise',\n",
       " 'takutkan': 'surprise',\n",
       " 'banggakan': 'surprise',\n",
       " 'cintakan': 'surprise',\n",
       " 'perbuat': 'surprise',\n",
       " 'merindukan': 'joy',\n",
       " 'ceraikan': 'surprise',\n",
       " 'jumpai': 'anger',\n",
       " 'rindunya': 'surprise',\n",
       " 'teringat': 'surprise',\n",
       " 'rinduu': 'surprise',\n",
       " 'lapar': 'sadness',\n",
       " 'kempunan': 'surprise',\n",
       " 'teringin': 'joy',\n",
       " 'kangen': 'joy',\n",
       " 'confuse': 'anger',\n",
       " 'stress': 'sadness',\n",
       " 'letih': 'joy',\n",
       " 'penat': 'joy',\n",
       " 'stres': 'sadness',\n",
       " 'mengantuk': 'joy',\n",
       " 'tertekan': 'sadness',\n",
       " 'terganggu': 'sadness',\n",
       " 'tertipu': 'sadness',\n",
       " 'keliru': 'sadness',\n",
       " 'mengeluh': 'sadness',\n",
       " 'merosot': 'sadness',\n",
       " 'susut': 'surprise',\n",
       " 'terjebak': 'sadness',\n",
       " 'terpengaruh': 'sadness',\n",
       " 'kesal': 'sadness',\n",
       " 'terkejut': 'surprise',\n",
       " 'bersalah': 'sadness',\n",
       " 'berdosa': 'anger',\n",
       " 'dihargai': 'sadness',\n",
       " 'janggal': 'surprise',\n",
       " 'resah': 'sadness',\n",
       " 'kesepian': 'sadness',\n",
       " 'gundah': 'surprise',\n",
       " 'goyah': 'surprise',\n",
       " 'disakiti': 'anger',\n",
       " 'takjub': 'anger',\n",
       " 'sengsara': 'sadness',\n",
       " 'seram': 'anger',\n",
       " 'menyebalkan': 'fear',\n",
       " 'merana': 'surprise',\n",
       " 'melarat': 'surprise',\n",
       " 'angkuh': 'anger',\n",
       " 'rakus': 'anger',\n",
       " 'terpuruk': 'anger',\n",
       " 'pengsan': 'surprise',\n",
       " 'tertido': 'anger',\n",
       " 'pitam': 'surprise',\n",
       " 'terlelap': 'anger',\n",
       " 'terberak': 'surprise',\n",
       " 'nanges': 'surprise',\n",
       " 'mengamuk': 'surprise',\n",
       " 'tdoq': 'anger',\n",
       " 'termuntah': 'surprise',\n",
       " 'tidor': 'anger',\n",
       " 'bangga': 'anger',\n",
       " 'surprise': 'surprise',\n",
       " 'suprise': 'love',\n",
       " 'makan2': 'fear',\n",
       " 'attention': 'fear',\n",
       " 'kejutan': 'fear',\n",
       " 'assignment': 'fear',\n",
       " 'comeback': 'fear',\n",
       " 'chance': 'love',\n",
       " 'homework': 'fear',\n",
       " 'appointment': 'fear',\n",
       " 'wtf': 'surprise',\n",
       " 'huh': 'love',\n",
       " 'seriously': 'love',\n",
       " 'omg': 'love',\n",
       " 'aik': 'love',\n",
       " 'wth': 'love',\n",
       " 'shit': 'anger',\n",
       " 'apoo': 'anger',\n",
       " 'hah': 'anger',\n",
       " 'damn': 'love',\n",
       " 'stun': 'surprise',\n",
       " 'pinafsueun': 'anger',\n",
       " 'neelehh': 'anger',\n",
       " 'rudgard': 'anger',\n",
       " '016344981': 'anger',\n",
       " 'pramaandika': 'anger',\n",
       " 'hamidibahawa': 'love',\n",
       " 'spesialers': 'anger',\n",
       " 'superpignan': 'anger',\n",
       " '082187486748': 'anger',\n",
       " 'tertanya2': 'anger',\n",
       " 'terperanjat': 'anger',\n",
       " 'cubaa': 'anger',\n",
       " 'stuju': 'anger',\n",
       " 'stayback': 'anger',\n",
       " 'cakaplah': 'anger',\n",
       " 'melebih': 'anger',\n",
       " 'tanyaa': 'anger',\n",
       " 'ngandung': 'anger'}"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "results_emotion"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
