From a45fa5f84376c98051dc59f4dd43526d1619da90 Mon Sep 17 00:00:00 2001 From: Jonas Weinz Date: Tue, 12 Jun 2018 16:41:09 +0200 Subject: [PATCH] printing out sentiment vector in the testing area --- .../simple_twitter_learning.ipynb | 885 ++++++++++-------- 1 file changed, 469 insertions(+), 416 deletions(-) diff --git a/Project/simple_approach/simple_twitter_learning.ipynb b/Project/simple_approach/simple_twitter_learning.ipynb index 5a25358..1dd7ab5 100644 --- a/Project/simple_approach/simple_twitter_learning.ipynb +++ b/Project/simple_approach/simple_twitter_learning.ipynb @@ -4,7 +4,32 @@ "cell_type": "code", "execution_count": 1, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[nltk_data] Downloading package punkt to /home/jonas/nltk_data...\n", + "[nltk_data] Package punkt is already up-to-date!\n", + "[nltk_data] Downloading package averaged_perceptron_tagger to\n", + "[nltk_data] /home/jonas/nltk_data...\n", + "[nltk_data] Package averaged_perceptron_tagger is already up-to-\n", + "[nltk_data] date!\n", + "[nltk_data] Downloading package wordnet to /home/jonas/nltk_data...\n", + "[nltk_data] Package wordnet is already up-to-date!\n" + ] + }, + { + "data": { + "text/plain": [ + "True" + ] + }, + "execution_count": 1, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "import pandas as pd\n", "from IPython.display import clear_output, Markdown, Math\n", @@ -17,7 +42,11 @@ "import sklearn.utils as sku\n", "from sklearn.feature_extraction.text import CountVectorizer, TfidfVectorizer, HashingVectorizer\n", "from sklearn.model_selection import train_test_split\n", - "from sklearn.preprocessing import MultiLabelBinarizer" + "from sklearn.preprocessing import MultiLabelBinarizer\n", + "import nltk\n", + "nltk.download('punkt')\n", + "nltk.download('averaged_perceptron_tagger')\n", + "nltk.download('wordnet')" ] }, { @@ -74,11 +103,11 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 4, "metadata": {}, "outputs": [], "source": [ - "data_root_folder = \"../data/en/\" # i created a symlink here" + "data_root_folder = \"./data_en/\" # i created a symlink here" ] }, { @@ -90,7 +119,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 5, "metadata": {}, "outputs": [], "source": [ @@ -113,7 +142,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 6, "metadata": {}, "outputs": [ { @@ -1205,7 +1234,7 @@ "[68733 rows x 9 columns]" ] }, - "execution_count": 7, + "execution_count": 6, "metadata": {}, "output_type": "execute_result" } @@ -1224,7 +1253,7 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 7, "metadata": {}, "outputs": [], "source": [ @@ -1243,7 +1272,7 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": 8, "metadata": {}, "outputs": [], "source": [ @@ -1261,7 +1290,7 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": 9, "metadata": {}, "outputs": [], "source": [ @@ -1278,7 +1307,7 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": 10, "metadata": {}, "outputs": [], "source": [ @@ -1298,7 +1327,7 @@ }, { "cell_type": "code", - "execution_count": 12, + "execution_count": 11, "metadata": {}, "outputs": [], "source": [ @@ -1307,7 +1336,7 @@ }, { "cell_type": "code", - "execution_count": 13, + "execution_count": 12, "metadata": {}, "outputs": [ { @@ -1316,7 +1345,7 @@ "68733" ] }, - "execution_count": 13, + "execution_count": 12, "metadata": {}, "output_type": "execute_result" } @@ -1327,7 +1356,7 @@ }, { "cell_type": "code", - "execution_count": 14, + "execution_count": 13, "metadata": {}, "outputs": [], "source": [ @@ -1343,7 +1372,7 @@ }, { "cell_type": "code", - "execution_count": 15, + "execution_count": 14, "metadata": {}, "outputs": [], "source": [ @@ -1354,7 +1383,7 @@ }, { "cell_type": "code", - "execution_count": 16, + "execution_count": 15, "metadata": {}, "outputs": [ { @@ -1378,7 +1407,7 @@ }, { "cell_type": "code", - "execution_count": 17, + "execution_count": 16, "metadata": {}, "outputs": [], "source": [ @@ -1391,7 +1420,7 @@ }, { "cell_type": "code", - "execution_count": 23, + "execution_count": 17, "metadata": {}, "outputs": [], "source": [ @@ -1411,7 +1440,7 @@ }, { "cell_type": "code", - "execution_count": 19, + "execution_count": 18, "metadata": {}, "outputs": [], "source": [ @@ -1427,7 +1456,7 @@ }, { "cell_type": "code", - "execution_count": 26, + "execution_count": 19, "metadata": {}, "outputs": [ { @@ -1454,7 +1483,7 @@ "53 omg do n't it scari all i know is that i do no...\n", "56 achoo mr. fuck nigga you , you done caught cau...\n", "58 i can never catch a dang break !\n", - "59 pa my p on two hour of sleep\n", + "59 pas my p on two hour of sleep\n", "60 i 'm realli not amus\n", "65 i can help you\n", "71 whew i slept good af last night\n", @@ -1522,7 +1551,7 @@ }, { "cell_type": "code", - "execution_count": 27, + "execution_count": 20, "metadata": {}, "outputs": [], "source": [ @@ -1563,7 +1592,7 @@ }, { "cell_type": "code", - "execution_count": 28, + "execution_count": 21, "metadata": {}, "outputs": [], "source": [ @@ -1572,7 +1601,7 @@ }, { "cell_type": "code", - "execution_count": 29, + "execution_count": 22, "metadata": {}, "outputs": [ { @@ -1649,7 +1678,7 @@ }, { "cell_type": "code", - "execution_count": 30, + "execution_count": 23, "metadata": {}, "outputs": [ { @@ -1677,7 +1706,7 @@ }, { "cell_type": "code", - "execution_count": 31, + "execution_count": 24, "metadata": {}, "outputs": [], "source": [ @@ -1686,7 +1715,7 @@ }, { "cell_type": "code", - "execution_count": 21, + "execution_count": 25, "metadata": {}, "outputs": [], "source": [ @@ -1695,7 +1724,7 @@ }, { "cell_type": "code", - "execution_count": 32, + "execution_count": 26, "metadata": {}, "outputs": [], "source": [ @@ -1713,15 +1742,13 @@ }, { "cell_type": "code", - "execution_count": 33, + "execution_count": 27, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ - "C:\\Users\\Maren\\Anaconda3\\lib\\site-packages\\h5py\\__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.\n", - " from ._conv import register_converters as _register_converters\n", "Using TensorFlow backend.\n" ] } @@ -1737,7 +1764,7 @@ }, { "cell_type": "code", - "execution_count": 34, + "execution_count": 28, "metadata": {}, "outputs": [], "source": [ @@ -1769,7 +1796,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 29, "metadata": {}, "outputs": [ { @@ -1777,7 +1804,12 @@ "output_type": "stream", "text": [ "Train on 18861 samples, validate on 4716 samples\n", - "Epoch 1/3\n" + "Epoch 1/3\n", + "18861/18861 [==============================] - 1106s 59ms/step - loss: 0.0185 - val_loss: 0.0152\n", + "Epoch 2/3\n", + "18861/18861 [==============================] - 1104s 59ms/step - loss: 0.0107 - val_loss: 0.0163\n", + "Epoch 3/3\n", + "18861/18861 [==============================] - 1106s 59ms/step - loss: 0.0065 - val_loss: 0.0166\n" ] } ], @@ -1794,7 +1826,7 @@ }, { "cell_type": "code", - "execution_count": 26, + "execution_count": 30, "metadata": {}, "outputs": [], "source": [ @@ -1803,14 +1835,14 @@ }, { "cell_type": "code", - "execution_count": 27, + "execution_count": 31, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "0.012647177\n", + "0.011668838\n", "0.03387511671001757\n" ] } @@ -1822,7 +1854,7 @@ }, { "cell_type": "code", - "execution_count": 33, + "execution_count": 32, "metadata": {}, "outputs": [], "source": [ @@ -1836,7 +1868,7 @@ }, { "cell_type": "code", - "execution_count": 34, + "execution_count": 33, "metadata": {}, "outputs": [ { @@ -1870,19 +1902,19 @@ " \n", " \n", " 35671\n", - " I feel like I care so much more in every situa...\n", + " i feel like i care so much more in everi situat\n", " πŸ˜‚\n", " [0.46813021474490496, 0.24716181096977158, 0.2...\n", - " 😒\n", - " [0.3881330192089081, 0.34921327233314514, 0.24...\n", + " πŸ˜…\n", + " [0.4447824954986572, 0.30056363344192505, 0.27...\n", " \n", " \n", " 25683\n", - " I did not meat to add that '2' there...havent ...\n", + " i did not meat to add that 2 there ... hav see...\n", " πŸ˜‚\n", " [0.46813021474490496, 0.24716181096977158, 0.2...\n", - " πŸ˜‚\n", - " [0.477517306804657, 0.2263115793466568, 0.2805...\n", + " 😁\n", + " [0.5660845637321472, 0.1737498641014099, 0.284...\n", " \n", " \n", " 8985\n", @@ -1890,159 +1922,159 @@ " 😊\n", " [0.7040175768989329, 0.059322033898305086, 0.2...\n", " πŸ˜‚\n", - " [0.4780172109603882, 0.24580059945583344, 0.25...\n", + " [0.4871470034122467, 0.26607102155685425, 0.27...\n", " \n", " \n", " 5410\n", - " Lmao on me!!! Wtf was he supposed to say\n", + " lmao on me ! ! ! wtf wa he suppos to say\n", " πŸ˜‚\n", " [0.46813021474490496, 0.24716181096977158, 0.2...\n", - " 😭\n", - " [0.3319989740848541, 0.38802555203437805, 0.23...\n", + " 😒\n", + " [0.4061833620071411, 0.3226468861103058, 0.273...\n", " \n", " \n", " 62611\n", - " This dude always help me get through my schoo...\n", + " this dude alway help me get through my school ...\n", " 😊\n", " [0.7040175768989329, 0.059322033898305086, 0.2...\n", " πŸ˜‚\n", - " [0.471467524766922, 0.19387008249759674, 0.299...\n", + " [0.4549962878227234, 0.21886931359767914, 0.33...\n", " \n", " \n", " 48197\n", - " Happy B'Day Sir\n", + " happi b'day sir\n", " 😊\n", " [0.7040175768989329, 0.059322033898305086, 0.2...\n", " πŸ˜€\n", - " [0.6342154145240784, 0.0916505753993988, 0.253...\n", + " [0.6561306715011597, 0.11821962147951126, 0.27...\n", " \n", " \n", " 23654\n", - " You need some good old fashioned Swedish Jesus\n", + " you need some good old fashion swedish jesus\n", " πŸ™\n", " [0.4983755685510071, 0.08057179987004548, 0.42...\n", - " πŸ˜‚\n", - " [0.4485129117965698, 0.2649095952510834, 0.266...\n", + " πŸ˜…\n", + " [0.4600130021572113, 0.28595462441444397, 0.27...\n", " \n", " \n", " 58207\n", - " these late shifts are making me not have a soc...\n", + " these late shift are make me not have a social...\n", " πŸ˜…\n", " [0.47186147186147187, 0.2922077922077922, 0.23...\n", - " 😒\n", - " [0.35744383931159973, 0.37891000509262085, 0.2...\n", + " πŸ˜‚\n", + " [0.49543458223342896, 0.25571855902671814, 0.2...\n", " \n", " \n", " 374\n", - " Dc this weekend\n", + " dc this weekend\n", " 😍\n", " [0.7296744771190439, 0.05173769460607014, 0.21...\n", - " 😁\n", - " [0.575383186340332, 0.14427249133586884, 0.250...\n", + " 😌\n", + " [0.6040589213371277, 0.15823380649089813, 0.26...\n", " \n", " \n", " 26310\n", - " Paul lad you'll make es blush\n", + " paul lad you 'll make e blush\n", " 😊\n", " [0.7040175768989329, 0.059322033898305086, 0.2...\n", - " 😒\n", - " [0.3773207664489746, 0.363784521818161, 0.2402...\n", + " πŸ˜‚\n", + " [0.452500581741333, 0.2882971167564392, 0.2790...\n", " \n", " \n", " 30892\n", - " Did you have a fun Halloween?\n", + " did you have a fun halloween ?\n", " πŸ˜‚\n", " [0.46813021474490496, 0.24716181096977158, 0.2...\n", " πŸ˜‚\n", - " [0.4547549784183502, 0.2675609588623047, 0.265...\n", + " [0.4644194543361664, 0.2708289325237274, 0.277...\n", " \n", " \n", " 11868\n", - " Hi handsome\n", + " hi handsom\n", " 😍\n", " [0.7296744771190439, 0.05173769460607014, 0.21...\n", - " πŸ™Œ\n", - " [0.6610512137413025, 0.07423651218414307, 0.20...\n", + " 😊\n", + " [0.7254493236541748, 0.12355809658765793, 0.22...\n", " \n", " \n", " 46219\n", - " I'm not okay with this, I'm suing Snapchat\n", + " i 'm not okay with this , i 'm su snapchat\n", " 😭\n", " [0.34310532030401736, 0.4364820846905538, 0.22...\n", - " 😒\n", - " [0.38139358162879944, 0.36385539174079895, 0.2...\n", + " πŸ˜”\n", + " [0.3264158070087433, 0.48023173213005066, 0.23...\n", " \n", " \n", " 13583\n", - " My parents be so mad I be buying new stuff &am...\n", + " my parent be so mad i be buy new stuff & amp ;...\n", " 😭\n", " [0.34310532030401736, 0.4364820846905538, 0.22...\n", - " 😒\n", - " [0.393837571144104, 0.3474741280078888, 0.2423...\n", + " πŸ˜‚\n", + " [0.4271591007709503, 0.29361462593078613, 0.29...\n", " \n", " \n", " 43843\n", - " One of the few songs that calms me down esp on...\n", + " one of the few song that calm me down esp on f...\n", " πŸ˜‚\n", " [0.46813021474490496, 0.24716181096977158, 0.2...\n", - " 😒\n", - " [0.36614790558815, 0.369498074054718, 0.239036...\n", + " πŸ˜‚\n", + " [0.44168680906295776, 0.2790682315826416, 0.29...\n", " \n", " \n", " 63589\n", - " iPhone X Bouta Be The Last Phone We Ever Buy\n", + " iphon x bouta be the last phone we ever buy\n", " πŸ˜‚\n", " [0.46813021474490496, 0.24716181096977158, 0.2...\n", - " 😭\n", - " [0.3337980806827545, 0.4099247455596924, 0.223...\n", + " πŸ˜…\n", + " [0.41863512992858887, 0.3106093108654022, 0.28...\n", " \n", " \n", " 53695\n", - " Visited my main man today ❀ i miss u papa\n", + " visit my main man today ❀ i miss u papa\n", " 😭\n", " [0.34310532030401736, 0.4364820846905538, 0.22...\n", " 😁\n", - " [0.5644013285636902, 0.14413486421108246, 0.25...\n", + " [0.5650997757911682, 0.19236208498477936, 0.27...\n", " \n", " \n", " 67529\n", - " Donuts\n", + " donut\n", " 😍\n", " [0.7296744771190439, 0.05173769460607014, 0.21...\n", " πŸ˜‚\n", - " [0.4482305943965912, 0.2685551047325134, 0.273...\n", + " [0.45511549711227417, 0.28582143783569336, 0.2...\n", " \n", " \n", " 25493\n", - " Has anyone heard this by ? Who the fuck knew...\n", + " ha anyon heard this by ? who the fuck knew he ...\n", " 😘\n", " [0.7546600877192983, 0.05290570175438596, 0.19...\n", - " πŸ˜‚\n", - " [0.41814130544662476, 0.27233976125717163, 0.2...\n", + " πŸ˜…\n", + " [0.4276219606399536, 0.30413898825645447, 0.28...\n", " \n", " \n", " 19486\n", - " Wow superrbb\n", + " wow superrbb\n", " 😍\n", " [0.7296744771190439, 0.05173769460607014, 0.21...\n", - " πŸ™Œ\n", - " [0.6488221883773804, 0.07963734865188599, 0.23...\n", + " 😊\n", + " [0.7149834036827087, 0.10459273308515549, 0.24...\n", " \n", " \n", " 48449\n", - " Of course they don't. Their perfect model ...\n", + " of cours they do n't . their perfect model of ...\n", " πŸ˜‚\n", " [0.46813021474490496, 0.24716181096977158, 0.2...\n", - " 😌\n", - " [0.5793762803077698, 0.14216111600399017, 0.24...\n", + " πŸ˜‚\n", + " [0.5363025665283203, 0.22163532674312592, 0.27...\n", " \n", " \n", " 4504\n", - " Please pick me. Pick me. Pick me. Please.\n", + " plea pick me . pick me . pick me . please .\n", " 😍\n", " [0.7296744771190439, 0.05173769460607014, 0.21...\n", - " 😁\n", - " [0.526153028011322, 0.1465001106262207, 0.2909...\n", + " πŸ˜‚\n", + " [0.4641677737236023, 0.18824045360088348, 0.37...\n", " \n", " \n", " 40285\n", @@ -2050,63 +2082,63 @@ " 😭\n", " [0.34310532030401736, 0.4364820846905538, 0.22...\n", " πŸ˜‚\n", - " [0.4464351236820221, 0.25675588846206665, 0.27...\n", + " [0.44292521476745605, 0.28201037645339966, 0.2...\n", " \n", " \n", " 56741\n", - " Pj still sleeps like a newborn\n", + " pj still sleep like a newborn\n", " 😩\n", " [0.22289823008849557, 0.5912610619469026, 0.18...\n", " 😒\n", - " [0.3798309564590454, 0.3601042628288269, 0.236...\n", + " [0.40168094635009766, 0.3777309060096741, 0.24...\n", " \n", " \n", " 22948\n", - " An opinion doesn't mean you make sense first ...\n", + " an opinion doe n't mean you make sen first off...\n", " 😌\n", " [0.6240601503759399, 0.13984962406015036, 0.23...\n", - " 😒\n", - " [0.3885924518108368, 0.35167044401168823, 0.23...\n", + " πŸ˜‚\n", + " [0.4365620017051697, 0.2830066680908203, 0.294...\n", " \n", " \n", " 68426\n", - " Missyou too\n", + " missyou too\n", " 😘\n", " [0.7546600877192983, 0.05290570175438596, 0.19...\n", " 😭\n", - " [0.32084617018699646, 0.4261379539966583, 0.21...\n", + " [0.3452186584472656, 0.4593580365180969, 0.223...\n", " \n", " \n", " 13431\n", - " I swear she did\n", + " i swear she did\n", " 😩\n", " [0.22289823008849557, 0.5912610619469026, 0.18...\n", " πŸ˜‚\n", - " [0.4509403705596924, 0.2531892657279968, 0.277...\n", + " [0.4436468482017517, 0.2736954987049103, 0.294...\n", " \n", " \n", " 66287\n", - " It’s true, he was the mutt’s (big-d) nuts.\n", + " it true , he wa the mutt ( big-d ) nut .\n", " πŸ˜‰\n", " [0.5634451019066403, 0.0992767915844839, 0.337...\n", - " πŸ˜‚\n", - " [0.43934985995292664, 0.27343544363975525, 0.2...\n", + " πŸ˜…\n", + " [0.47334975004196167, 0.2881445586681366, 0.26...\n", " \n", " \n", " 41980\n", - " is happening so happy\n", + " is happen so happi\n", " 😭\n", " [0.34310532030401736, 0.4364820846905538, 0.22...\n", - " πŸ˜‚\n", - " [0.5246269106864929, 0.21524660289287567, 0.23...\n", + " πŸ˜…\n", + " [0.4635038673877716, 0.30251604318618774, 0.26...\n", " \n", " \n", " 34632\n", - " Saw that the first one said sosee you tmmrw a...\n", + " saw that the first one said sose you tmmrw and np\n", " πŸ˜‚\n", " [0.46813021474490496, 0.24716181096977158, 0.2...\n", - " 😒\n", - " [0.40898817777633667, 0.32723960280418396, 0.2...\n", + " πŸ˜…\n", + " [0.43297499418258667, 0.31000325083732605, 0.2...\n", " \n", " \n", " ...\n", @@ -2118,243 +2150,243 @@ " \n", " \n", " 47218\n", - " Keep it I don't want it\n", + " keep it i do n't want it\n", " πŸ˜‚\n", " [0.46813021474490496, 0.24716181096977158, 0.2...\n", - " πŸ˜‚\n", - " [0.46869081258773804, 0.2421991378068924, 0.26...\n", + " πŸ˜…\n", + " [0.470976859331131, 0.2997904419898987, 0.2489...\n", " \n", " \n", " 35087\n", - " 6 years ago today we said our final good byes ...\n", + " 6 year ago today we said our final good bye , ...\n", " 😒\n", " [0.39118825100133514, 0.38451268357810414, 0.2...\n", - " πŸ˜‚\n", - " [0.4856921434402466, 0.25167116522789, 0.24757...\n", + " πŸ˜…\n", + " [0.4478594660758972, 0.30181050300598145, 0.27...\n", " \n", " \n", " 61252\n", " amen\n", " πŸ™\n", " [0.4983755685510071, 0.08057179987004548, 0.42...\n", - " πŸ™\n", - " [0.48897236585617065, 0.09773151576519012, 0.3...\n", + " 😁\n", + " [0.5783949494361877, 0.15405726432800293, 0.30...\n", " \n", " \n", " 39960\n", - " FACT\n", + " fact\n", " 😎\n", " [0.5981432360742706, 0.10477453580901856, 0.29...\n", " πŸ˜‚\n", - " [0.4365101754665375, 0.2751618027687073, 0.265...\n", + " [0.4938848316669464, 0.24237176775932312, 0.25...\n", " \n", " \n", " 365\n", - " nw Finally Found Someone Hi Loydi\n", + " nw final found someon hi loydi\n", " πŸ˜…\n", " [0.47186147186147187, 0.2922077922077922, 0.23...\n", - " πŸ™Œ\n", - " [0.6661455631256104, 0.07442493736743927, 0.22...\n", + " 😌\n", + " [0.6203110218048096, 0.17863908410072327, 0.23...\n", " \n", " \n", " 50665\n", - " I need ur shoulder to cry on\n", + " i need ur shoulder to cri on\n", " 😒\n", " [0.39118825100133514, 0.38451268357810414, 0.2...\n", - " πŸ˜‚\n", - " [0.5001665949821472, 0.18579629063606262, 0.27...\n", + " πŸ˜…\n", + " [0.4619033932685852, 0.2977892756462097, 0.267...\n", " \n", " \n", " 21007\n", - " awww you'll get me teary eyed gurl!\n", + " awww you 'll get me teari eye gurl !\n", " 😘\n", " [0.7546600877192983, 0.05290570175438596, 0.19...\n", - " 😭\n", - " [0.32326677441596985, 0.39027056097984314, 0.1...\n", + " πŸ˜…\n", + " [0.5029815435409546, 0.2711288630962372, 0.253...\n", " \n", " \n", " 18819\n", - " γ€°Happy Hump Day to all my Ladies is def swe...\n", + " γ€°happi hump day to all my ladi is def sweet like\n", " 😘\n", " [0.7546600877192983, 0.05290570175438596, 0.19...\n", - " πŸ˜‚\n", - " [0.5100692510604858, 0.19811441004276276, 0.26...\n", + " πŸ™Œ\n", + " [0.6974080801010132, 0.11416944861412048, 0.24...\n", " \n", " \n", " 42421\n", - " Thanks.\n", + " thanks .\n", " 😊\n", " [0.7040175768989329, 0.059322033898305086, 0.2...\n", - " 😊\n", - " [0.6941412687301636, 0.07213307917118073, 0.21...\n", + " 😁\n", + " [0.5765037536621094, 0.18341206014156342, 0.26...\n", " \n", " \n", " 38705\n", - " its okay I didn’t see you until I was in your...\n", + " it okay i did n't see you until i wa in your face\n", " πŸ˜‚\n", " [0.46813021474490496, 0.24716181096977158, 0.2...\n", - " πŸ˜‚\n", - " [0.4489935338497162, 0.24917839467525482, 0.28...\n", + " 😒\n", + " [0.4030645787715912, 0.36543628573417664, 0.25...\n", " \n", " \n", " 47033\n", - " Fall in with alexissdanger ⬅️\n", + " fall in with alexissdang ⬅️\n", " 😍\n", " [0.7296744771190439, 0.05173769460607014, 0.21...\n", - " πŸ˜…\n", - " [0.4509217441082001, 0.2770771086215973, 0.229...\n", + " 😌\n", + " [0.6219494342803955, 0.1795988380908966, 0.226...\n", " \n", " \n", " 38742\n", - " Let your wild side free girl!!!!!\n", + " let your wild side free girl ! ! ! ! !\n", " πŸ˜‚\n", " [0.46813021474490496, 0.24716181096977158, 0.2...\n", - " πŸ˜‚\n", - " [0.5023915767669678, 0.22065317630767822, 0.26...\n", + " 😒\n", + " [0.4049544930458069, 0.35102248191833496, 0.25...\n", " \n", " \n", " 67610\n", - " Can we get season 3 already!?\n", + " can we get season 3 already ! ?\n", " 😭\n", " [0.34310532030401736, 0.4364820846905538, 0.22...\n", - " πŸ˜…\n", - " [0.49751874804496765, 0.2405281811952591, 0.23...\n", + " 😒\n", + " [0.416861355304718, 0.35468244552612305, 0.245...\n", " \n", " \n", " 61021\n", - " Have to quote this bih remember this nigga\n", + " have to quot this bih rememb this nigga\n", " πŸ˜‚\n", " [0.46813021474490496, 0.24716181096977158, 0.2...\n", " πŸ˜‚\n", - " [0.44404181838035583, 0.2531435489654541, 0.28...\n", + " [0.4401417672634125, 0.2810788154602051, 0.292...\n", " \n", " \n", " 14904\n", - " He so damn\n", + " he so damn\n", " 😩\n", " [0.22289823008849557, 0.5912610619469026, 0.18...\n", - " 😒\n", - " [0.395942747592926, 0.34198662638664246, 0.220...\n", + " πŸ˜‚\n", + " [0.5411785244941711, 0.2148503214120865, 0.246...\n", " \n", " \n", " 50994\n", - " YASSS It's time for a great show Maxloyalβ„’β™›:G...\n", + " yasss it time for a great show maxloyalβ„’β™› : gi...\n", " πŸ˜‚\n", " [0.46813021474490496, 0.24716181096977158, 0.2...\n", - " 😍\n", - " [0.7120986580848694, 0.05822291225194931, 0.19...\n", + " πŸ™Œ\n", + " [0.7073097229003906, 0.12480126321315765, 0.23...\n", " \n", " \n", " 6973\n", - " Got to love a fish finger sarnie\n", + " got to love a fish finger sarni\n", " πŸ˜‚\n", " [0.46813021474490496, 0.24716181096977158, 0.2...\n", - " πŸ˜‚\n", - " [0.5202821493148804, 0.19921283423900604, 0.26...\n", + " 😌\n", + " [0.6375303864479065, 0.14495858550071716, 0.24...\n", " \n", " \n", " 3269\n", " say dat\n", " πŸ˜‚\n", " [0.46813021474490496, 0.24716181096977158, 0.2...\n", - " 😁\n", - " [0.5501073598861694, 0.15135927498340607, 0.26...\n", + " πŸ˜‚\n", + " [0.5052645802497864, 0.21280284225940704, 0.30...\n", " \n", " \n", " 54827\n", - " If ur happy I'm happy\n", + " if ur happi i 'm happi\n", " 😊\n", " [0.7040175768989329, 0.059322033898305086, 0.2...\n", - " 😊\n", - " [0.6811650395393372, 0.076321542263031, 0.2262...\n", + " πŸ˜…\n", + " [0.5138391852378845, 0.26520460844039917, 0.25...\n", " \n", " \n", " 19409\n", - " Rockstar\n", + " rockstar\n", " πŸ˜€\n", " [0.6560364464692483, 0.08428246013667426, 0.25...\n", - " 😌\n", - " [0.6229063868522644, 0.10924336314201355, 0.23...\n", + " πŸ˜‚\n", + " [0.520979106426239, 0.22392335534095764, 0.265...\n", " \n", " \n", " 38703\n", - " God fuck me I already fixed it once\n", - " πŸ˜‚\n", - " [0.46813021474490496, 0.24716181096977158, 0.2...\n", - " 😒\n", - " [0.3869953751564026, 0.3528730273246765, 0.244...\n", - " \n", - " \n", - " 25133\n", - " It’s socially acceptable to listen to ANY Chr...\n", - " πŸ˜‚\n", - " [0.46813021474490496, 0.24716181096977158, 0.2...\n", - " 😁\n", - " [0.5611444115638733, 0.16056178510189056, 0.24...\n", - " \n", - " \n", - " 15339\n", - " I thrashed p in iMessage now he wanna bet on 2k\n", - " πŸ˜‚\n", - " [0.46813021474490496, 0.24716181096977158, 0.2...\n", - " πŸ˜‚\n", - " [0.4555157423019409, 0.2545802891254425, 0.276...\n", - " \n", - " \n", - " 28082\n", - " my fatass need some lemon pepper wings w a lil...\n", + " god fuck me i alreadi fix it onc\n", " πŸ˜‚\n", " [0.46813021474490496, 0.24716181096977158, 0.2...\n", " πŸ˜”\n", - " [0.29292455315589905, 0.45915406942367554, 0.1...\n", + " [0.32009249925613403, 0.4819949269294739, 0.22...\n", " \n", " \n", - " 44462\n", - " fck off tristan yes soph collect u in 15 n w...\n", - " 😀\n", - " [0.2691131498470948, 0.4801223241590214, 0.250...\n", - " 😌\n", - " [0.5860549211502075, 0.13672666251659393, 0.24...\n", - " \n", - " \n", - " 60212\n", - " Open the bag\n", - " πŸ˜‹\n", - " [0.6784741144414169, 0.04495912806539509, 0.27...\n", - " πŸ˜‚\n", - " [0.45511847734451294, 0.24822814762592316, 0.2...\n", - " \n", - " \n", - " 34950\n", - " I asked people to guess my zodiac sign and thi...\n", - " 😀\n", - " [0.2691131498470948, 0.4801223241590214, 0.250...\n", - " πŸ˜‚\n", - " [0.4273592531681061, 0.28500065207481384, 0.27...\n", - " \n", - " \n", - " 59462\n", - " I regret this sm\n", + " 25133\n", + " it social accept to listen to ani christma mus...\n", " πŸ˜‚\n", " [0.46813021474490496, 0.24716181096977158, 0.2...\n", - " πŸ˜‚\n", - " [0.43678316473960876, 0.24388131499290466, 0.2...\n", + " 😁\n", + " [0.5703040361404419, 0.17875489592552185, 0.27...\n", " \n", " \n", - " 19465\n", - " Fuck college\n", + " 15339\n", + " i thrash p in imessag now he wan na bet on 2k\n", " πŸ˜‚\n", " [0.46813021474490496, 0.24716181096977158, 0.2...\n", " πŸ˜…\n", - " [0.43676847219467163, 0.30419719219207764, 0.2...\n", + " [0.4571400284767151, 0.2949279546737671, 0.269...\n", + " \n", + " \n", + " 28082\n", + " my fatass need some lemon pepper wing w a lil ...\n", + " πŸ˜‚\n", + " [0.46813021474490496, 0.24716181096977158, 0.2...\n", + " 😭\n", + " [0.36291953921318054, 0.4310339391231537, 0.22...\n", + " \n", + " \n", + " 44462\n", + " fck off tristan yes soph collect u in 15 n we ...\n", + " 😀\n", + " [0.2691131498470948, 0.4801223241590214, 0.250...\n", + " 😌\n", + " [0.6122021675109863, 0.15579015016555786, 0.27...\n", + " \n", + " \n", + " 60212\n", + " open the bag\n", + " πŸ˜‹\n", + " [0.6784741144414169, 0.04495912806539509, 0.27...\n", + " πŸ˜‚\n", + " [0.470508873462677, 0.2711063623428345, 0.2810...\n", + " \n", + " \n", + " 34950\n", + " i ask peopl to guess my zodiac sign and this o...\n", + " 😀\n", + " [0.2691131498470948, 0.4801223241590214, 0.250...\n", + " πŸ˜‚\n", + " [0.4431285262107849, 0.27477312088012695, 0.29...\n", + " \n", + " \n", + " 59462\n", + " i regret this sm\n", + " πŸ˜‚\n", + " [0.46813021474490496, 0.24716181096977158, 0.2...\n", + " 😒\n", + " [0.40375131368637085, 0.3289208710193634, 0.27...\n", + " \n", + " \n", + " 19465\n", + " fuck colleg\n", + " πŸ˜‚\n", + " [0.46813021474490496, 0.24716181096977158, 0.2...\n", + " πŸ˜…\n", + " [0.4494284391403198, 0.31076472997665405, 0.26...\n", " \n", " \n", " 8135\n", - " Aye this was my first time actually seeing it...\n", + " aye this wa my first time actual see it wendi ...\n", " πŸ˜‚\n", " [0.46813021474490496, 0.24716181096977158, 0.2...\n", - " πŸ˜‚\n", - " [0.45839327573776245, 0.2764120101928711, 0.26...\n", + " πŸ˜…\n", + " [0.42708122730255127, 0.31392431259155273, 0.2...\n", " \n", " \n", "\n", @@ -2363,193 +2395,193 @@ ], "text/plain": [ " text teacher \\\n", - "35671 I feel like I care so much more in every situa... πŸ˜‚ \n", - "25683 I did not meat to add that '2' there...havent ... πŸ˜‚ \n", - "8985 never… 😊 \n", - "5410 Lmao on me!!! Wtf was he supposed to say πŸ˜‚ \n", - "62611 This dude always help me get through my schoo... 😊 \n", - "48197 Happy B'Day Sir 😊 \n", - "23654 You need some good old fashioned Swedish Jesus πŸ™ \n", - "58207 these late shifts are making me not have a soc... πŸ˜… \n", - "374 Dc this weekend 😍 \n", - "26310 Paul lad you'll make es blush 😊 \n", - "30892 Did you have a fun Halloween? πŸ˜‚ \n", - "11868 Hi handsome 😍 \n", - "46219 I'm not okay with this, I'm suing Snapchat 😭 \n", - "13583 My parents be so mad I be buying new stuff &am... 😭 \n", - "43843 One of the few songs that calms me down esp on... πŸ˜‚ \n", - "63589 iPhone X Bouta Be The Last Phone We Ever Buy πŸ˜‚ \n", - "53695 Visited my main man today ❀ i miss u papa 😭 \n", - "67529 Donuts 😍 \n", - "25493 Has anyone heard this by ? Who the fuck knew... 😘 \n", - "19486 Wow superrbb 😍 \n", - "48449 Of course they don't. Their perfect model ... πŸ˜‚ \n", - "4504 Please pick me. Pick me. Pick me. Please. 😍 \n", + "35671 i feel like i care so much more in everi situat πŸ˜‚ \n", + "25683 i did not meat to add that 2 there ... hav see... πŸ˜‚ \n", + "8985 never… 😊 \n", + "5410 lmao on me ! ! ! wtf wa he suppos to say πŸ˜‚ \n", + "62611 this dude alway help me get through my school ... 😊 \n", + "48197 happi b'day sir 😊 \n", + "23654 you need some good old fashion swedish jesus πŸ™ \n", + "58207 these late shift are make me not have a social... πŸ˜… \n", + "374 dc this weekend 😍 \n", + "26310 paul lad you 'll make e blush 😊 \n", + "30892 did you have a fun halloween ? πŸ˜‚ \n", + "11868 hi handsom 😍 \n", + "46219 i 'm not okay with this , i 'm su snapchat 😭 \n", + "13583 my parent be so mad i be buy new stuff & amp ;... 😭 \n", + "43843 one of the few song that calm me down esp on f... πŸ˜‚ \n", + "63589 iphon x bouta be the last phone we ever buy πŸ˜‚ \n", + "53695 visit my main man today ❀ i miss u papa 😭 \n", + "67529 donut 😍 \n", + "25493 ha anyon heard this by ? who the fuck knew he ... 😘 \n", + "19486 wow superrbb 😍 \n", + "48449 of cours they do n't . their perfect model of ... πŸ˜‚ \n", + "4504 plea pick me . pick me . pick me . please . 😍 \n", "40285 shiid no crack is wack 😭 \n", - "56741 Pj still sleeps like a newborn 😩 \n", - "22948 An opinion doesn't mean you make sense first ... 😌 \n", - "68426 Missyou too 😘 \n", - "13431 I swear she did 😩 \n", - "66287 It’s true, he was the mutt’s (big-d) nuts. πŸ˜‰ \n", - "41980 is happening so happy 😭 \n", - "34632 Saw that the first one said sosee you tmmrw a... πŸ˜‚ \n", + "56741 pj still sleep like a newborn 😩 \n", + "22948 an opinion doe n't mean you make sen first off... 😌 \n", + "68426 missyou too 😘 \n", + "13431 i swear she did 😩 \n", + "66287 it true , he wa the mutt ( big-d ) nut . πŸ˜‰ \n", + "41980 is happen so happi 😭 \n", + "34632 saw that the first one said sose you tmmrw and np πŸ˜‚ \n", "... ... ... \n", - "47218 Keep it I don't want it πŸ˜‚ \n", - "35087 6 years ago today we said our final good byes ... 😒 \n", - "61252 amen πŸ™ \n", - "39960 FACT 😎 \n", - "365 nw Finally Found Someone Hi Loydi πŸ˜… \n", - "50665 I need ur shoulder to cry on 😒 \n", - "21007 awww you'll get me teary eyed gurl! 😘 \n", - "18819 γ€°Happy Hump Day to all my Ladies is def swe... 😘 \n", - "42421 Thanks. 😊 \n", - "38705 its okay I didn’t see you until I was in your... πŸ˜‚ \n", - "47033 Fall in with alexissdanger ⬅️ 😍 \n", - "38742 Let your wild side free girl!!!!! πŸ˜‚ \n", - "67610 Can we get season 3 already!? 😭 \n", - "61021 Have to quote this bih remember this nigga πŸ˜‚ \n", - "14904 He so damn 😩 \n", - "50994 YASSS It's time for a great show Maxloyalβ„’β™›:G... πŸ˜‚ \n", - "6973 Got to love a fish finger sarnie πŸ˜‚ \n", - "3269 say dat πŸ˜‚ \n", - "54827 If ur happy I'm happy 😊 \n", - "19409 Rockstar πŸ˜€ \n", - "38703 God fuck me I already fixed it once πŸ˜‚ \n", - "25133 It’s socially acceptable to listen to ANY Chr... πŸ˜‚ \n", - "15339 I thrashed p in iMessage now he wanna bet on 2k πŸ˜‚ \n", - "28082 my fatass need some lemon pepper wings w a lil... πŸ˜‚ \n", - "44462 fck off tristan yes soph collect u in 15 n w... 😀 \n", - "60212 Open the bag πŸ˜‹ \n", - "34950 I asked people to guess my zodiac sign and thi... 😀 \n", - "59462 I regret this sm πŸ˜‚ \n", - "19465 Fuck college πŸ˜‚ \n", - "8135 Aye this was my first time actually seeing it... πŸ˜‚ \n", + "47218 keep it i do n't want it πŸ˜‚ \n", + "35087 6 year ago today we said our final good bye , ... 😒 \n", + "61252 amen πŸ™ \n", + "39960 fact 😎 \n", + "365 nw final found someon hi loydi πŸ˜… \n", + "50665 i need ur shoulder to cri on 😒 \n", + "21007 awww you 'll get me teari eye gurl ! 😘 \n", + "18819 γ€°happi hump day to all my ladi is def sweet like 😘 \n", + "42421 thanks . 😊 \n", + "38705 it okay i did n't see you until i wa in your face πŸ˜‚ \n", + "47033 fall in with alexissdang ⬅️ 😍 \n", + "38742 let your wild side free girl ! ! ! ! ! πŸ˜‚ \n", + "67610 can we get season 3 already ! ? 😭 \n", + "61021 have to quot this bih rememb this nigga πŸ˜‚ \n", + "14904 he so damn 😩 \n", + "50994 yasss it time for a great show maxloyalβ„’β™› : gi... πŸ˜‚ \n", + "6973 got to love a fish finger sarni πŸ˜‚ \n", + "3269 say dat πŸ˜‚ \n", + "54827 if ur happi i 'm happi 😊 \n", + "19409 rockstar πŸ˜€ \n", + "38703 god fuck me i alreadi fix it onc πŸ˜‚ \n", + "25133 it social accept to listen to ani christma mus... πŸ˜‚ \n", + "15339 i thrash p in imessag now he wan na bet on 2k πŸ˜‚ \n", + "28082 my fatass need some lemon pepper wing w a lil ... πŸ˜‚ \n", + "44462 fck off tristan yes soph collect u in 15 n we ... 😀 \n", + "60212 open the bag πŸ˜‹ \n", + "34950 i ask peopl to guess my zodiac sign and this o... 😀 \n", + "59462 i regret this sm πŸ˜‚ \n", + "19465 fuck colleg πŸ˜‚ \n", + "8135 aye this wa my first time actual see it wendi ... πŸ˜‚ \n", "\n", " teacher_sentiment predict \\\n", - "35671 [0.46813021474490496, 0.24716181096977158, 0.2... 😒 \n", - "25683 [0.46813021474490496, 0.24716181096977158, 0.2... πŸ˜‚ \n", + "35671 [0.46813021474490496, 0.24716181096977158, 0.2... πŸ˜… \n", + "25683 [0.46813021474490496, 0.24716181096977158, 0.2... 😁 \n", "8985 [0.7040175768989329, 0.059322033898305086, 0.2... πŸ˜‚ \n", - "5410 [0.46813021474490496, 0.24716181096977158, 0.2... 😭 \n", + "5410 [0.46813021474490496, 0.24716181096977158, 0.2... 😒 \n", "62611 [0.7040175768989329, 0.059322033898305086, 0.2... πŸ˜‚ \n", "48197 [0.7040175768989329, 0.059322033898305086, 0.2... πŸ˜€ \n", - "23654 [0.4983755685510071, 0.08057179987004548, 0.42... πŸ˜‚ \n", - "58207 [0.47186147186147187, 0.2922077922077922, 0.23... 😒 \n", - "374 [0.7296744771190439, 0.05173769460607014, 0.21... 😁 \n", - "26310 [0.7040175768989329, 0.059322033898305086, 0.2... 😒 \n", + "23654 [0.4983755685510071, 0.08057179987004548, 0.42... πŸ˜… \n", + "58207 [0.47186147186147187, 0.2922077922077922, 0.23... πŸ˜‚ \n", + "374 [0.7296744771190439, 0.05173769460607014, 0.21... 😌 \n", + "26310 [0.7040175768989329, 0.059322033898305086, 0.2... πŸ˜‚ \n", "30892 [0.46813021474490496, 0.24716181096977158, 0.2... πŸ˜‚ \n", - "11868 [0.7296744771190439, 0.05173769460607014, 0.21... πŸ™Œ \n", - "46219 [0.34310532030401736, 0.4364820846905538, 0.22... 😒 \n", - "13583 [0.34310532030401736, 0.4364820846905538, 0.22... 😒 \n", - "43843 [0.46813021474490496, 0.24716181096977158, 0.2... 😒 \n", - "63589 [0.46813021474490496, 0.24716181096977158, 0.2... 😭 \n", + "11868 [0.7296744771190439, 0.05173769460607014, 0.21... 😊 \n", + "46219 [0.34310532030401736, 0.4364820846905538, 0.22... πŸ˜” \n", + "13583 [0.34310532030401736, 0.4364820846905538, 0.22... πŸ˜‚ \n", + "43843 [0.46813021474490496, 0.24716181096977158, 0.2... πŸ˜‚ \n", + "63589 [0.46813021474490496, 0.24716181096977158, 0.2... πŸ˜… \n", "53695 [0.34310532030401736, 0.4364820846905538, 0.22... 😁 \n", "67529 [0.7296744771190439, 0.05173769460607014, 0.21... πŸ˜‚ \n", - "25493 [0.7546600877192983, 0.05290570175438596, 0.19... πŸ˜‚ \n", - "19486 [0.7296744771190439, 0.05173769460607014, 0.21... πŸ™Œ \n", - "48449 [0.46813021474490496, 0.24716181096977158, 0.2... 😌 \n", - "4504 [0.7296744771190439, 0.05173769460607014, 0.21... 😁 \n", + "25493 [0.7546600877192983, 0.05290570175438596, 0.19... πŸ˜… \n", + "19486 [0.7296744771190439, 0.05173769460607014, 0.21... 😊 \n", + "48449 [0.46813021474490496, 0.24716181096977158, 0.2... πŸ˜‚ \n", + "4504 [0.7296744771190439, 0.05173769460607014, 0.21... πŸ˜‚ \n", "40285 [0.34310532030401736, 0.4364820846905538, 0.22... πŸ˜‚ \n", "56741 [0.22289823008849557, 0.5912610619469026, 0.18... 😒 \n", - "22948 [0.6240601503759399, 0.13984962406015036, 0.23... 😒 \n", + "22948 [0.6240601503759399, 0.13984962406015036, 0.23... πŸ˜‚ \n", "68426 [0.7546600877192983, 0.05290570175438596, 0.19... 😭 \n", "13431 [0.22289823008849557, 0.5912610619469026, 0.18... πŸ˜‚ \n", - "66287 [0.5634451019066403, 0.0992767915844839, 0.337... πŸ˜‚ \n", - "41980 [0.34310532030401736, 0.4364820846905538, 0.22... πŸ˜‚ \n", - "34632 [0.46813021474490496, 0.24716181096977158, 0.2... 😒 \n", + "66287 [0.5634451019066403, 0.0992767915844839, 0.337... πŸ˜… \n", + "41980 [0.34310532030401736, 0.4364820846905538, 0.22... πŸ˜… \n", + "34632 [0.46813021474490496, 0.24716181096977158, 0.2... πŸ˜… \n", "... ... ... \n", - "47218 [0.46813021474490496, 0.24716181096977158, 0.2... πŸ˜‚ \n", - "35087 [0.39118825100133514, 0.38451268357810414, 0.2... πŸ˜‚ \n", - "61252 [0.4983755685510071, 0.08057179987004548, 0.42... πŸ™ \n", + "47218 [0.46813021474490496, 0.24716181096977158, 0.2... πŸ˜… \n", + "35087 [0.39118825100133514, 0.38451268357810414, 0.2... πŸ˜… \n", + "61252 [0.4983755685510071, 0.08057179987004548, 0.42... 😁 \n", "39960 [0.5981432360742706, 0.10477453580901856, 0.29... πŸ˜‚ \n", - "365 [0.47186147186147187, 0.2922077922077922, 0.23... πŸ™Œ \n", - "50665 [0.39118825100133514, 0.38451268357810414, 0.2... πŸ˜‚ \n", - "21007 [0.7546600877192983, 0.05290570175438596, 0.19... 😭 \n", - "18819 [0.7546600877192983, 0.05290570175438596, 0.19... πŸ˜‚ \n", - "42421 [0.7040175768989329, 0.059322033898305086, 0.2... 😊 \n", - "38705 [0.46813021474490496, 0.24716181096977158, 0.2... πŸ˜‚ \n", - "47033 [0.7296744771190439, 0.05173769460607014, 0.21... πŸ˜… \n", - "38742 [0.46813021474490496, 0.24716181096977158, 0.2... πŸ˜‚ \n", - "67610 [0.34310532030401736, 0.4364820846905538, 0.22... πŸ˜… \n", + "365 [0.47186147186147187, 0.2922077922077922, 0.23... 😌 \n", + "50665 [0.39118825100133514, 0.38451268357810414, 0.2... πŸ˜… \n", + "21007 [0.7546600877192983, 0.05290570175438596, 0.19... πŸ˜… \n", + "18819 [0.7546600877192983, 0.05290570175438596, 0.19... πŸ™Œ \n", + "42421 [0.7040175768989329, 0.059322033898305086, 0.2... 😁 \n", + "38705 [0.46813021474490496, 0.24716181096977158, 0.2... 😒 \n", + "47033 [0.7296744771190439, 0.05173769460607014, 0.21... 😌 \n", + "38742 [0.46813021474490496, 0.24716181096977158, 0.2... 😒 \n", + "67610 [0.34310532030401736, 0.4364820846905538, 0.22... 😒 \n", "61021 [0.46813021474490496, 0.24716181096977158, 0.2... πŸ˜‚ \n", - "14904 [0.22289823008849557, 0.5912610619469026, 0.18... 😒 \n", - "50994 [0.46813021474490496, 0.24716181096977158, 0.2... 😍 \n", - "6973 [0.46813021474490496, 0.24716181096977158, 0.2... πŸ˜‚ \n", - "3269 [0.46813021474490496, 0.24716181096977158, 0.2... 😁 \n", - "54827 [0.7040175768989329, 0.059322033898305086, 0.2... 😊 \n", - "19409 [0.6560364464692483, 0.08428246013667426, 0.25... 😌 \n", - "38703 [0.46813021474490496, 0.24716181096977158, 0.2... 😒 \n", + "14904 [0.22289823008849557, 0.5912610619469026, 0.18... πŸ˜‚ \n", + "50994 [0.46813021474490496, 0.24716181096977158, 0.2... πŸ™Œ \n", + "6973 [0.46813021474490496, 0.24716181096977158, 0.2... 😌 \n", + "3269 [0.46813021474490496, 0.24716181096977158, 0.2... πŸ˜‚ \n", + "54827 [0.7040175768989329, 0.059322033898305086, 0.2... πŸ˜… \n", + "19409 [0.6560364464692483, 0.08428246013667426, 0.25... πŸ˜‚ \n", + "38703 [0.46813021474490496, 0.24716181096977158, 0.2... πŸ˜” \n", "25133 [0.46813021474490496, 0.24716181096977158, 0.2... 😁 \n", - "15339 [0.46813021474490496, 0.24716181096977158, 0.2... πŸ˜‚ \n", - "28082 [0.46813021474490496, 0.24716181096977158, 0.2... πŸ˜” \n", + "15339 [0.46813021474490496, 0.24716181096977158, 0.2... πŸ˜… \n", + "28082 [0.46813021474490496, 0.24716181096977158, 0.2... 😭 \n", "44462 [0.2691131498470948, 0.4801223241590214, 0.250... 😌 \n", "60212 [0.6784741144414169, 0.04495912806539509, 0.27... πŸ˜‚ \n", "34950 [0.2691131498470948, 0.4801223241590214, 0.250... πŸ˜‚ \n", - "59462 [0.46813021474490496, 0.24716181096977158, 0.2... πŸ˜‚ \n", + "59462 [0.46813021474490496, 0.24716181096977158, 0.2... 😒 \n", "19465 [0.46813021474490496, 0.24716181096977158, 0.2... πŸ˜… \n", - "8135 [0.46813021474490496, 0.24716181096977158, 0.2... πŸ˜‚ \n", + "8135 [0.46813021474490496, 0.24716181096977158, 0.2... πŸ˜… \n", "\n", " predicted_sentiment \n", - "35671 [0.3881330192089081, 0.34921327233314514, 0.24... \n", - "25683 [0.477517306804657, 0.2263115793466568, 0.2805... \n", - "8985 [0.4780172109603882, 0.24580059945583344, 0.25... \n", - "5410 [0.3319989740848541, 0.38802555203437805, 0.23... \n", - "62611 [0.471467524766922, 0.19387008249759674, 0.299... \n", - "48197 [0.6342154145240784, 0.0916505753993988, 0.253... \n", - "23654 [0.4485129117965698, 0.2649095952510834, 0.266... \n", - "58207 [0.35744383931159973, 0.37891000509262085, 0.2... \n", - "374 [0.575383186340332, 0.14427249133586884, 0.250... \n", - "26310 [0.3773207664489746, 0.363784521818161, 0.2402... \n", - "30892 [0.4547549784183502, 0.2675609588623047, 0.265... \n", - "11868 [0.6610512137413025, 0.07423651218414307, 0.20... \n", - "46219 [0.38139358162879944, 0.36385539174079895, 0.2... \n", - "13583 [0.393837571144104, 0.3474741280078888, 0.2423... \n", - "43843 [0.36614790558815, 0.369498074054718, 0.239036... \n", - "63589 [0.3337980806827545, 0.4099247455596924, 0.223... \n", - "53695 [0.5644013285636902, 0.14413486421108246, 0.25... \n", - "67529 [0.4482305943965912, 0.2685551047325134, 0.273... \n", - "25493 [0.41814130544662476, 0.27233976125717163, 0.2... \n", - "19486 [0.6488221883773804, 0.07963734865188599, 0.23... \n", - "48449 [0.5793762803077698, 0.14216111600399017, 0.24... \n", - "4504 [0.526153028011322, 0.1465001106262207, 0.2909... \n", - "40285 [0.4464351236820221, 0.25675588846206665, 0.27... \n", - "56741 [0.3798309564590454, 0.3601042628288269, 0.236... \n", - "22948 [0.3885924518108368, 0.35167044401168823, 0.23... \n", - "68426 [0.32084617018699646, 0.4261379539966583, 0.21... \n", - "13431 [0.4509403705596924, 0.2531892657279968, 0.277... \n", - "66287 [0.43934985995292664, 0.27343544363975525, 0.2... \n", - "41980 [0.5246269106864929, 0.21524660289287567, 0.23... \n", - "34632 [0.40898817777633667, 0.32723960280418396, 0.2... \n", + "35671 [0.4447824954986572, 0.30056363344192505, 0.27... \n", + "25683 [0.5660845637321472, 0.1737498641014099, 0.284... \n", + "8985 [0.4871470034122467, 0.26607102155685425, 0.27... \n", + "5410 [0.4061833620071411, 0.3226468861103058, 0.273... \n", + "62611 [0.4549962878227234, 0.21886931359767914, 0.33... \n", + "48197 [0.6561306715011597, 0.11821962147951126, 0.27... \n", + "23654 [0.4600130021572113, 0.28595462441444397, 0.27... \n", + "58207 [0.49543458223342896, 0.25571855902671814, 0.2... \n", + "374 [0.6040589213371277, 0.15823380649089813, 0.26... \n", + "26310 [0.452500581741333, 0.2882971167564392, 0.2790... \n", + "30892 [0.4644194543361664, 0.2708289325237274, 0.277... \n", + "11868 [0.7254493236541748, 0.12355809658765793, 0.22... \n", + "46219 [0.3264158070087433, 0.48023173213005066, 0.23... \n", + "13583 [0.4271591007709503, 0.29361462593078613, 0.29... \n", + "43843 [0.44168680906295776, 0.2790682315826416, 0.29... \n", + "63589 [0.41863512992858887, 0.3106093108654022, 0.28... \n", + "53695 [0.5650997757911682, 0.19236208498477936, 0.27... \n", + "67529 [0.45511549711227417, 0.28582143783569336, 0.2... \n", + "25493 [0.4276219606399536, 0.30413898825645447, 0.28... \n", + "19486 [0.7149834036827087, 0.10459273308515549, 0.24... \n", + "48449 [0.5363025665283203, 0.22163532674312592, 0.27... \n", + "4504 [0.4641677737236023, 0.18824045360088348, 0.37... \n", + "40285 [0.44292521476745605, 0.28201037645339966, 0.2... \n", + "56741 [0.40168094635009766, 0.3777309060096741, 0.24... \n", + "22948 [0.4365620017051697, 0.2830066680908203, 0.294... \n", + "68426 [0.3452186584472656, 0.4593580365180969, 0.223... \n", + "13431 [0.4436468482017517, 0.2736954987049103, 0.294... \n", + "66287 [0.47334975004196167, 0.2881445586681366, 0.26... \n", + "41980 [0.4635038673877716, 0.30251604318618774, 0.26... \n", + "34632 [0.43297499418258667, 0.31000325083732605, 0.2... \n", "... ... \n", - "47218 [0.46869081258773804, 0.2421991378068924, 0.26... \n", - "35087 [0.4856921434402466, 0.25167116522789, 0.24757... \n", - "61252 [0.48897236585617065, 0.09773151576519012, 0.3... \n", - "39960 [0.4365101754665375, 0.2751618027687073, 0.265... \n", - "365 [0.6661455631256104, 0.07442493736743927, 0.22... \n", - "50665 [0.5001665949821472, 0.18579629063606262, 0.27... \n", - "21007 [0.32326677441596985, 0.39027056097984314, 0.1... \n", - "18819 [0.5100692510604858, 0.19811441004276276, 0.26... \n", - "42421 [0.6941412687301636, 0.07213307917118073, 0.21... \n", - "38705 [0.4489935338497162, 0.24917839467525482, 0.28... \n", - "47033 [0.4509217441082001, 0.2770771086215973, 0.229... \n", - "38742 [0.5023915767669678, 0.22065317630767822, 0.26... \n", - "67610 [0.49751874804496765, 0.2405281811952591, 0.23... \n", - "61021 [0.44404181838035583, 0.2531435489654541, 0.28... \n", - "14904 [0.395942747592926, 0.34198662638664246, 0.220... \n", - "50994 [0.7120986580848694, 0.05822291225194931, 0.19... \n", - "6973 [0.5202821493148804, 0.19921283423900604, 0.26... \n", - "3269 [0.5501073598861694, 0.15135927498340607, 0.26... \n", - "54827 [0.6811650395393372, 0.076321542263031, 0.2262... \n", - "19409 [0.6229063868522644, 0.10924336314201355, 0.23... \n", - "38703 [0.3869953751564026, 0.3528730273246765, 0.244... \n", - "25133 [0.5611444115638733, 0.16056178510189056, 0.24... \n", - "15339 [0.4555157423019409, 0.2545802891254425, 0.276... \n", - "28082 [0.29292455315589905, 0.45915406942367554, 0.1... \n", - "44462 [0.5860549211502075, 0.13672666251659393, 0.24... \n", - "60212 [0.45511847734451294, 0.24822814762592316, 0.2... \n", - "34950 [0.4273592531681061, 0.28500065207481384, 0.27... \n", - "59462 [0.43678316473960876, 0.24388131499290466, 0.2... \n", - "19465 [0.43676847219467163, 0.30419719219207764, 0.2... \n", - "8135 [0.45839327573776245, 0.2764120101928711, 0.26... \n", + "47218 [0.470976859331131, 0.2997904419898987, 0.2489... \n", + "35087 [0.4478594660758972, 0.30181050300598145, 0.27... \n", + "61252 [0.5783949494361877, 0.15405726432800293, 0.30... \n", + "39960 [0.4938848316669464, 0.24237176775932312, 0.25... \n", + "365 [0.6203110218048096, 0.17863908410072327, 0.23... \n", + "50665 [0.4619033932685852, 0.2977892756462097, 0.267... \n", + "21007 [0.5029815435409546, 0.2711288630962372, 0.253... \n", + "18819 [0.6974080801010132, 0.11416944861412048, 0.24... \n", + "42421 [0.5765037536621094, 0.18341206014156342, 0.26... \n", + "38705 [0.4030645787715912, 0.36543628573417664, 0.25... \n", + "47033 [0.6219494342803955, 0.1795988380908966, 0.226... \n", + "38742 [0.4049544930458069, 0.35102248191833496, 0.25... \n", + "67610 [0.416861355304718, 0.35468244552612305, 0.245... \n", + "61021 [0.4401417672634125, 0.2810788154602051, 0.292... \n", + "14904 [0.5411785244941711, 0.2148503214120865, 0.246... \n", + "50994 [0.7073097229003906, 0.12480126321315765, 0.23... \n", + "6973 [0.6375303864479065, 0.14495858550071716, 0.24... \n", + "3269 [0.5052645802497864, 0.21280284225940704, 0.30... \n", + "54827 [0.5138391852378845, 0.26520460844039917, 0.25... \n", + "19409 [0.520979106426239, 0.22392335534095764, 0.265... \n", + "38703 [0.32009249925613403, 0.4819949269294739, 0.22... \n", + "25133 [0.5703040361404419, 0.17875489592552185, 0.27... \n", + "15339 [0.4571400284767151, 0.2949279546737671, 0.269... \n", + "28082 [0.36291953921318054, 0.4310339391231537, 0.22... \n", + "44462 [0.6122021675109863, 0.15579015016555786, 0.27... \n", + "60212 [0.470508873462677, 0.2711063623428345, 0.2810... \n", + "34950 [0.4431285262107849, 0.27477312088012695, 0.29... \n", + "59462 [0.40375131368637085, 0.3289208710193634, 0.27... \n", + "19465 [0.4494284391403198, 0.31076472997665405, 0.26... \n", + "8135 [0.42708122730255127, 0.31392431259155273, 0.2... \n", "\n", "[2620 rows x 5 columns]" ] @@ -2571,14 +2603,14 @@ }, { "cell_type": "code", - "execution_count": 60, + "execution_count": 34, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "0.21221374045801528\n" + "0.1851145038167939\n" ] } ], @@ -2595,13 +2627,13 @@ }, { "cell_type": "code", - "execution_count": 73, + "execution_count": 35, "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "array([0.02218067, 0.02490165, 0.00302656])" + "array([0.02218282, 0.02594105, 0.00323429])" ] }, "metadata": {}, @@ -2625,7 +2657,7 @@ }, { "cell_type": "code", - "execution_count": 75, + "execution_count": 36, "metadata": {}, "outputs": [ { @@ -2633,7 +2665,7 @@ "output_type": "stream", "text": [ "Variance teacher: [0.02183094 0.02513847 0.00285735]\n", - "Variance prediction: [0.00863898 0.00919997 0.00082446]\n" + "Variance prediction: [0.00850173 0.00793481 0.00095984]\n" ] } ], @@ -2644,7 +2676,7 @@ }, { "cell_type": "code", - "execution_count": 35, + "execution_count": 37, "metadata": {}, "outputs": [], "source": [ @@ -2660,13 +2692,13 @@ }, { "cell_type": "code", - "execution_count": 36, + "execution_count": 38, "metadata": {}, "outputs": [], "source": [ "import pickle\n", - "clf.save(\"clf.keras\")\n", - "pickle.dump( vectorizer, open( \"vec.pickle\", \"wb\" ) )" + "clf.save(\"clf2.keras\")\n", + "pickle.dump( vectorizer, open( \"vec2.pickle\", \"wb\" ) )" ] }, { @@ -2690,7 +2722,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 1, "metadata": {}, "outputs": [], "source": [ @@ -2738,11 +2770,11 @@ }, { "cell_type": "code", - "execution_count": 37, + "execution_count": 6, "metadata": {}, "outputs": [], "source": [ - "lookup_emojis = ['πŸ˜‚',\n", + "lookup_emojis = [#'πŸ˜‚',\n", " '😭',\n", " '😍',\n", " '😩',\n", @@ -2773,13 +2805,13 @@ }, { "cell_type": "code", - "execution_count": 40, + "execution_count": 19, "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "8a4248b8f8d147a58cdc02f4be7fbe03", + "model_id": "755aa31644db4628a3be1ff3b621fa28", "version_major": 2, "version_minor": 0 }, @@ -2793,7 +2825,7 @@ { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "525901f072994db2a57e654faa5b9b39", + "model_id": "4601eccc07074e71983c9005d1d329b1", "version_major": 2, "version_minor": 0 }, @@ -2825,7 +2857,9 @@ " with out:\n", " pred = clf.predict(vectorizer.transform([t.value]))\n", " \n", - " display(Markdown(\"# \" + str(sent2emoji(pred, lookup_emojis)[0])))\n", + " display(Markdown(\"# Predicted Emoji \" + str(sent2emoji(pred, lookup_emojis)[0])))\n", + " display(Markdown(\"# Sentiment Vector: $$ \\pmatrix{\" + str(pred[0,0]) +\n", + " \"\\\\\\\\\" + str(pred[0,1]) + \"\\\\\\\\\" + str(pred[0,2]) + \"}$$\"))\n", "\n", "b.on_click(handle_submit)\n", " \n", @@ -2835,9 +2869,21 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 5, "metadata": {}, - "outputs": [], + "outputs": [ + { + "ename": "NameError", + "evalue": "name 'mlb' is not defined", + "output_type": "error", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)", + "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mnumpy\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0mnp\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 2\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 3\u001b[0;31m \u001b[0my_trans\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mmlb\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0minverse_transform\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0myt1\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 4\u001b[0m \u001b[0mpred_trans\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mmlb\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0minverse_transform\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0myt1\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 5\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;31mNameError\u001b[0m: name 'mlb' is not defined" + ] + } + ], "source": [ "import numpy as np\n", "\n", @@ -2862,6 +2908,13 @@ "cell_type": "markdown", "metadata": {}, "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] } ], "metadata": { @@ -2880,7 +2933,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.6.4" + "version": "3.6.5" } }, "nbformat": 4,