├── README.md
└── abuser.ipynb
/README.md:
--------------------------------------------------------------------------------
1 | # destruct_conversation
2 |
--------------------------------------------------------------------------------
/abuser.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "nbformat": 4,
3 | "nbformat_minor": 0,
4 | "metadata": {
5 | "colab": {
6 | "name": "abuser.ipynb",
7 | "provenance": [],
8 | "authorship_tag": "ABX9TyNfeW4eL3s6pNyoCrouLA01",
9 | "include_colab_link": true
10 | },
11 | "kernelspec": {
12 | "name": "python3",
13 | "display_name": "Python 3"
14 | },
15 | "language_info": {
16 | "name": "python"
17 | }
18 | },
19 | "cells": [
20 | {
21 | "cell_type": "markdown",
22 | "metadata": {
23 | "id": "view-in-github",
24 | "colab_type": "text"
25 | },
26 | "source": [
27 | "
"
28 | ]
29 | },
30 | {
31 | "cell_type": "code",
32 | "metadata": {
33 | "colab": {
34 | "base_uri": "https://localhost:8080/",
35 | "height": 1000
36 | },
37 | "id": "VKrgO0mypsVe",
38 | "outputId": "3cd24ea7-3c11-479a-ac27-41567bb8a928"
39 | },
40 | "source": [
41 | "! pip install deeppavlov"
42 | ],
43 | "execution_count": 2,
44 | "outputs": [
45 | {
46 | "output_type": "stream",
47 | "text": [
48 | "Collecting deeppavlov\n",
49 | "\u001b[?25l Downloading https://files.pythonhosted.org/packages/22/87/e77ccc7de09f8c5c4a3d981ff6b1d3811d9978976a30bec9bdf50d667ebb/deeppavlov-0.15.0-py3-none-any.whl (907kB)\n",
50 | "\u001b[K |████████████████████████████████| 911kB 5.7MB/s \n",
51 | "\u001b[?25hCollecting pydantic==1.3\n",
52 | "\u001b[?25l Downloading https://files.pythonhosted.org/packages/4b/56/1f652c3f658d2a9fd495d2e988a2da57eabdb6c4b8f4563c2ccbe6a2a8c5/pydantic-1.3-cp37-cp37m-manylinux2010_x86_64.whl (7.3MB)\n",
53 | "\u001b[K |████████████████████████████████| 7.3MB 15.6MB/s \n",
54 | "\u001b[?25hCollecting sacremoses==0.0.35\n",
55 | "\u001b[?25l Downloading https://files.pythonhosted.org/packages/1f/8e/ed5364a06a9ba720fddd9820155cc57300d28f5f43a6fd7b7e817177e642/sacremoses-0.0.35.tar.gz (859kB)\n",
56 | "\u001b[K |████████████████████████████████| 860kB 32.8MB/s \n",
57 | "\u001b[?25hCollecting h5py==2.10.0\n",
58 | "\u001b[?25l Downloading https://files.pythonhosted.org/packages/3f/c0/abde58b837e066bca19a3f7332d9d0493521d7dd6b48248451a9e3fe2214/h5py-2.10.0-cp37-cp37m-manylinux1_x86_64.whl (2.9MB)\n",
59 | "\u001b[K |████████████████████████████████| 2.9MB 18.9MB/s \n",
60 | "\u001b[?25hRequirement already satisfied: click==7.1.2 in /usr/local/lib/python3.7/dist-packages (from deeppavlov) (7.1.2)\n",
61 | "Requirement already satisfied: scipy==1.4.1 in /usr/local/lib/python3.7/dist-packages (from deeppavlov) (1.4.1)\n",
62 | "Collecting pyopenssl==19.1.0\n",
63 | "\u001b[?25l Downloading https://files.pythonhosted.org/packages/9e/de/f8342b68fa9e981d348039954657bdf681b2ab93de27443be51865ffa310/pyOpenSSL-19.1.0-py2.py3-none-any.whl (53kB)\n",
64 | "\u001b[K |████████████████████████████████| 61kB 6.8MB/s \n",
65 | "\u001b[?25hCollecting rusenttokenize==0.0.5\n",
66 | " Downloading https://files.pythonhosted.org/packages/25/4c/a2f00be5def774a3df2e5387145f1cb54e324607ec4a7e23f573645946e7/rusenttokenize-0.0.5-py3-none-any.whl\n",
67 | "Collecting requests==2.22.0\n",
68 | "\u001b[?25l Downloading https://files.pythonhosted.org/packages/51/bd/23c926cd341ea6b7dd0b2a00aba99ae0f828be89d72b2190f27c11d4b7fb/requests-2.22.0-py2.py3-none-any.whl (57kB)\n",
69 | "\u001b[K |████████████████████████████████| 61kB 7.4MB/s \n",
70 | "\u001b[?25hCollecting aio-pika==6.4.1\n",
71 | "\u001b[?25l Downloading https://files.pythonhosted.org/packages/c8/07/196a4115cbef31fa0c3dabdea146f02dffe5e49998341d20dbe2278953bc/aio_pika-6.4.1-py3-none-any.whl (40kB)\n",
72 | "\u001b[K |████████████████████████████████| 51kB 6.2MB/s \n",
73 | "\u001b[?25hCollecting prometheus-client==0.7.1\n",
74 | " Downloading https://files.pythonhosted.org/packages/b3/23/41a5a24b502d35a4ad50a5bb7202a5e1d9a0364d0c12f56db3dbf7aca76d/prometheus_client-0.7.1.tar.gz\n",
75 | "Collecting pymorphy2-dicts-ru\n",
76 | "\u001b[?25l Downloading https://files.pythonhosted.org/packages/3a/79/bea0021eeb7eeefde22ef9e96badf174068a2dd20264b9a378f2be1cdd9e/pymorphy2_dicts_ru-2.4.417127.4579844-py2.py3-none-any.whl (8.2MB)\n",
77 | "\u001b[K |████████████████████████████████| 8.2MB 18.8MB/s \n",
78 | "\u001b[?25hCollecting uvicorn==0.11.7\n",
79 | "\u001b[?25l Downloading https://files.pythonhosted.org/packages/a9/5f/2bc87272f189662e129ddcd4807ad3ef83128b4df3a3482335f5f9790f24/uvicorn-0.11.7-py3-none-any.whl (43kB)\n",
80 | "\u001b[K |████████████████████████████████| 51kB 6.0MB/s \n",
81 | "\u001b[?25hCollecting overrides==2.7.0\n",
82 | " Downloading https://files.pythonhosted.org/packages/ac/98/2430afd204c48ac0a529d439d7e22df8fa603c668d03456b5947cb59ec36/overrides-2.7.0.tar.gz\n",
83 | "Collecting pymorphy2==0.8\n",
84 | "\u001b[?25l Downloading https://files.pythonhosted.org/packages/a3/33/fff9675c68b5f6c63ec8c6e6ff57827dda28a1fa5b2c2d727dffff92dd47/pymorphy2-0.8-py2.py3-none-any.whl (46kB)\n",
85 | "\u001b[K |████████████████████████████████| 51kB 5.7MB/s \n",
86 | "\u001b[?25hCollecting pytelegrambotapi==3.6.7\n",
87 | "\u001b[?25l Downloading https://files.pythonhosted.org/packages/62/ab/99c606f69fcda57e35788b913dd34c9d9acb48dd26349141b3855dcf6351/pyTelegramBotAPI-3.6.7.tar.gz (65kB)\n",
88 | "\u001b[K |████████████████████████████████| 71kB 7.2MB/s \n",
89 | "\u001b[?25hCollecting scikit-learn==0.21.2\n",
90 | "\u001b[?25l Downloading https://files.pythonhosted.org/packages/21/a4/a48bd4b0d15395362b561df7e7247de87291105eb736a3b2aaffebf437b9/scikit_learn-0.21.2-cp37-cp37m-manylinux1_x86_64.whl (6.7MB)\n",
91 | "\u001b[K |████████████████████████████████| 6.7MB 12.3MB/s \n",
92 | "\u001b[?25hCollecting Cython==0.29.14\n",
93 | "\u001b[?25l Downloading https://files.pythonhosted.org/packages/d8/58/2deb24de3c10cc4c0f09639b46f4f4b50059f0fdc785128a57dd9fdce026/Cython-0.29.14-cp37-cp37m-manylinux1_x86_64.whl (2.1MB)\n",
94 | "\u001b[K |████████████████████████████████| 2.1MB 19.6MB/s \n",
95 | "\u001b[?25hCollecting ruamel.yaml==0.15.100\n",
96 | "\u001b[?25l Downloading https://files.pythonhosted.org/packages/71/fc/12de89822adaa3a60b8cb0139bae75918278999d08e6dff158623abd7cba/ruamel.yaml-0.15.100-cp37-cp37m-manylinux1_x86_64.whl (654kB)\n",
97 | "\u001b[K |████████████████████████████████| 655kB 40.9MB/s \n",
98 | "\u001b[?25hCollecting nltk==3.4.5\n",
99 | "\u001b[?25l Downloading https://files.pythonhosted.org/packages/f6/1d/d925cfb4f324ede997f6d47bea4d9babba51b49e87a767c170b77005889d/nltk-3.4.5.zip (1.5MB)\n",
100 | "\u001b[K |████████████████████████████████| 1.5MB 26.6MB/s \n",
101 | "\u001b[?25hRequirement already satisfied: filelock==3.0.12 in /usr/local/lib/python3.7/dist-packages (from deeppavlov) (3.0.12)\n",
102 | "Collecting uvloop==0.14.0\n",
103 | "\u001b[?25l Downloading https://files.pythonhosted.org/packages/9b/7a/54a80c03b555af21680a2f3692947b43a0d576d90c4c18cace0fee1ccc0e/uvloop-0.14.0-cp37-cp37m-manylinux2010_x86_64.whl (3.8MB)\n",
104 | "\u001b[K |████████████████████████████████| 3.8MB 20.3MB/s \n",
105 | "\u001b[?25hCollecting pandas==0.25.3\n",
106 | "\u001b[?25l Downloading https://files.pythonhosted.org/packages/63/e0/a1b39cdcb2c391f087a1538bc8a6d62a82d0439693192aef541d7b123769/pandas-0.25.3-cp37-cp37m-manylinux1_x86_64.whl (10.4MB)\n",
107 | "\u001b[K |████████████████████████████████| 10.4MB 17.4MB/s \n",
108 | "\u001b[?25hCollecting fastapi==0.47.1\n",
109 | "\u001b[?25l Downloading https://files.pythonhosted.org/packages/a3/a7/4804d7abf8a1544d079d50650af872387154ebdac5bd07d54b2e60e2b334/fastapi-0.47.1-py3-none-any.whl (43kB)\n",
110 | "\u001b[K |████████████████████████████████| 51kB 6.0MB/s \n",
111 | "\u001b[?25hCollecting numpy==1.18.0\n",
112 | "\u001b[?25l Downloading https://files.pythonhosted.org/packages/20/53/127cb49435bcf5d841baf8eafa030931c62a9eac577a641f8c2293d23371/numpy-1.18.0-cp37-cp37m-manylinux1_x86_64.whl (20.1MB)\n",
113 | "\u001b[K |████████████████████████████████| 20.1MB 9.6MB/s \n",
114 | "\u001b[?25hCollecting pytz==2019.1\n",
115 | "\u001b[?25l Downloading https://files.pythonhosted.org/packages/3d/73/fe30c2daaaa0713420d0382b16fbb761409f532c56bdcc514bf7b6262bb6/pytz-2019.1-py2.py3-none-any.whl (510kB)\n",
116 | "\u001b[K |████████████████████████████████| 512kB 42.7MB/s \n",
117 | "\u001b[?25hRequirement already satisfied: tqdm==4.41.1 in /usr/local/lib/python3.7/dist-packages (from deeppavlov) (4.41.1)\n",
118 | "Requirement already satisfied: six in /usr/local/lib/python3.7/dist-packages (from sacremoses==0.0.35->deeppavlov) (1.15.0)\n",
119 | "Requirement already satisfied: joblib in /usr/local/lib/python3.7/dist-packages (from sacremoses==0.0.35->deeppavlov) (1.0.1)\n",
120 | "Collecting cryptography>=2.8\n",
121 | "\u001b[?25l Downloading https://files.pythonhosted.org/packages/b2/26/7af637e6a7e87258b963f1731c5982fb31cd507f0d90d91836e446955d02/cryptography-3.4.7-cp36-abi3-manylinux2014_x86_64.whl (3.2MB)\n",
122 | "\u001b[K |████████████████████████████████| 3.2MB 29.1MB/s \n",
123 | "\u001b[?25hCollecting idna<2.9,>=2.5\n",
124 | "\u001b[?25l Downloading https://files.pythonhosted.org/packages/14/2c/cd551d81dbe15200be1cf41cd03869a46fe7226e7450af7a6545bfc474c9/idna-2.8-py2.py3-none-any.whl (58kB)\n",
125 | "\u001b[K |████████████████████████████████| 61kB 7.1MB/s \n",
126 | "\u001b[?25hRequirement already satisfied: chardet<3.1.0,>=3.0.2 in /usr/local/lib/python3.7/dist-packages (from requests==2.22.0->deeppavlov) (3.0.4)\n",
127 | "Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /usr/local/lib/python3.7/dist-packages (from requests==2.22.0->deeppavlov) (1.24.3)\n",
128 | "Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.7/dist-packages (from requests==2.22.0->deeppavlov) (2020.12.5)\n",
129 | "Collecting yarl\n",
130 | "\u001b[?25l Downloading https://files.pythonhosted.org/packages/f1/62/046834c5fc998c88ab2ef722f5d42122230a632212c8afa76418324f53ff/yarl-1.6.3-cp37-cp37m-manylinux2014_x86_64.whl (294kB)\n",
131 | "\u001b[K |████████████████████████████████| 296kB 51.0MB/s \n",
132 | "\u001b[?25hCollecting aiormq<4,>=3.2.0\n",
133 | " Downloading https://files.pythonhosted.org/packages/0b/c4/dc5b9d50c15af2ee187974a5a0c3f20c06cce6559eea4c065d372e846b6a/aiormq-3.3.1-py3-none-any.whl\n",
134 | "Collecting h11<0.10,>=0.8\n",
135 | "\u001b[?25l Downloading https://files.pythonhosted.org/packages/5a/fd/3dad730b0f95e78aeeb742f96fa7bbecbdd56a58e405d3da440d5bfb90c6/h11-0.9.0-py2.py3-none-any.whl (53kB)\n",
136 | "\u001b[K |████████████████████████████████| 61kB 7.3MB/s \n",
137 | "\u001b[?25hCollecting httptools==0.1.*; sys_platform != \"win32\" and sys_platform != \"cygwin\" and platform_python_implementation != \"PyPy\"\n",
138 | "\u001b[?25l Downloading https://files.pythonhosted.org/packages/25/2e/485131e3aa113929b425f83854fafc190aa7df716cbeb258c875752f0c6e/httptools-0.1.2-cp37-cp37m-manylinux1_x86_64.whl (219kB)\n",
139 | "\u001b[K |████████████████████████████████| 225kB 45.8MB/s \n",
140 | "\u001b[?25hCollecting websockets==8.*\n",
141 | "\u001b[?25l Downloading https://files.pythonhosted.org/packages/5a/0b/3ebc752392a368af14dd24ee041683416ac6d2463eead94b311b11e41c82/websockets-8.1-cp37-cp37m-manylinux2010_x86_64.whl (79kB)\n",
142 | "\u001b[K |████████████████████████████████| 81kB 8.8MB/s \n",
143 | "\u001b[?25hCollecting pymorphy2-dicts<3.0,>=2.4\n",
144 | "\u001b[?25l Downloading https://files.pythonhosted.org/packages/02/51/2465fd4f72328ab50877b54777764d928da8cb15b74e2680fc1bd8cb3173/pymorphy2_dicts-2.4.393442.3710985-py2.py3-none-any.whl (7.1MB)\n",
145 | "\u001b[K |████████████████████████████████| 7.1MB 17.0MB/s \n",
146 | "\u001b[?25hRequirement already satisfied: docopt>=0.6 in /usr/local/lib/python3.7/dist-packages (from pymorphy2==0.8->deeppavlov) (0.6.2)\n",
147 | "Collecting dawg-python>=0.7\n",
148 | " Downloading https://files.pythonhosted.org/packages/6a/84/ff1ce2071d4c650ec85745766c0047ccc3b5036f1d03559fd46bb38b5eeb/DAWG_Python-0.7.2-py2.py3-none-any.whl\n",
149 | "Requirement already satisfied: python-dateutil>=2.6.1 in /usr/local/lib/python3.7/dist-packages (from pandas==0.25.3->deeppavlov) (2.8.1)\n",
150 | "Collecting starlette<=0.12.9,>=0.12.9\n",
151 | "\u001b[?25l Downloading https://files.pythonhosted.org/packages/67/95/2220fe5bf287e693a6430d8ee36c681b0157035b7249ec08f8fb36319d16/starlette-0.12.9.tar.gz (46kB)\n",
152 | "\u001b[K |████████████████████████████████| 51kB 6.6MB/s \n",
153 | "\u001b[?25hRequirement already satisfied: cffi>=1.12 in /usr/local/lib/python3.7/dist-packages (from cryptography>=2.8->pyopenssl==19.1.0->deeppavlov) (1.14.5)\n",
154 | "Collecting multidict>=4.0\n",
155 | "\u001b[?25l Downloading https://files.pythonhosted.org/packages/7c/a6/4123b8165acbe773d1a8dc8e3f0d1edea16d29f7de018eda769abb56bd30/multidict-5.1.0-cp37-cp37m-manylinux2014_x86_64.whl (142kB)\n",
156 | "\u001b[K |████████████████████████████████| 143kB 41.9MB/s \n",
157 | "\u001b[?25hRequirement already satisfied: typing-extensions>=3.7.4; python_version < \"3.8\" in /usr/local/lib/python3.7/dist-packages (from yarl->aio-pika==6.4.1->deeppavlov) (3.7.4.3)\n",
158 | "Collecting pamqp==2.3.0\n",
159 | " Downloading https://files.pythonhosted.org/packages/eb/56/afa06143361e640c9159d828dadc95fc9195c52c95b4a97d136617b0166d/pamqp-2.3.0-py2.py3-none-any.whl\n",
160 | "Requirement already satisfied: pycparser in /usr/local/lib/python3.7/dist-packages (from cffi>=1.12->cryptography>=2.8->pyopenssl==19.1.0->deeppavlov) (2.20)\n",
161 | "Building wheels for collected packages: sacremoses, prometheus-client, overrides, pytelegrambotapi, nltk, starlette\n",
162 | " Building wheel for sacremoses (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
163 | " Created wheel for sacremoses: filename=sacremoses-0.0.35-cp37-none-any.whl size=883990 sha256=aac067b39987eb42065c4b9fa1f1d8a2cfc6f8b9bbe244406bd1327fe8d85cc2\n",
164 | " Stored in directory: /root/.cache/pip/wheels/63/2a/db/63e2909042c634ef551d0d9ac825b2b0b32dede4a6d87ddc94\n",
165 | " Building wheel for prometheus-client (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
166 | " Created wheel for prometheus-client: filename=prometheus_client-0.7.1-cp37-none-any.whl size=41404 sha256=95c75eb7280ee3815c5e26192c2fd9ad9f1d2a2de57fe5a0c1c46cc4dfd90160\n",
167 | " Stored in directory: /root/.cache/pip/wheels/1c/54/34/fd47cd9b308826cc4292b54449c1899a30251ef3b506bc91ea\n",
168 | " Building wheel for overrides (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
169 | " Created wheel for overrides: filename=overrides-2.7.0-cp37-none-any.whl size=5606 sha256=4cc3a13080642ff202a6f8ed00dcae57e237493be973e72e8ac1fe543a0d05d9\n",
170 | " Stored in directory: /root/.cache/pip/wheels/8c/7c/ef/80508418b67d87371c5b3de49e03eb22ee7c1d19affb5099f8\n",
171 | " Building wheel for pytelegrambotapi (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
172 | " Created wheel for pytelegrambotapi: filename=pyTelegramBotAPI-3.6.7-cp37-none-any.whl size=47177 sha256=3f7178f752a4e35058d8ae5d1401961fd79299de913bc866e4293fabf5b525cf\n",
173 | " Stored in directory: /root/.cache/pip/wheels/23/40/18/8a34153f95ef0dc19e3954898e5a5079244b76a8afdd7d0ec5\n",
174 | " Building wheel for nltk (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
175 | " Created wheel for nltk: filename=nltk-3.4.5-cp37-none-any.whl size=1449923 sha256=5e3eda0d1b978227b050ae74b49dc7475edb317288886d7def06bc17362f276d\n",
176 | " Stored in directory: /root/.cache/pip/wheels/96/86/f6/68ab24c23f207c0077381a5e3904b2815136b879538a24b483\n",
177 | " Building wheel for starlette (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
178 | " Created wheel for starlette: filename=starlette-0.12.9-cp37-none-any.whl size=57254 sha256=4d59d82e2d08b1c68a37986f62e859b8c52923a443c99f44e2e55b1aa53581a2\n",
179 | " Stored in directory: /root/.cache/pip/wheels/1c/51/5b/3828d52e185cafad941c4291b6f70894d0794be28c70addae5\n",
180 | "Successfully built sacremoses prometheus-client overrides pytelegrambotapi nltk starlette\n",
181 | "\u001b[31mERROR: xarray 0.18.2 has requirement pandas>=1.0, but you'll have pandas 0.25.3 which is incompatible.\u001b[0m\n",
182 | "\u001b[31mERROR: tensorflow 2.5.0 has requirement h5py~=3.1.0, but you'll have h5py 2.10.0 which is incompatible.\u001b[0m\n",
183 | "\u001b[31mERROR: tensorflow 2.5.0 has requirement numpy~=1.19.2, but you'll have numpy 1.18.0 which is incompatible.\u001b[0m\n",
184 | "\u001b[31mERROR: kapre 0.3.5 has requirement numpy>=1.18.5, but you'll have numpy 1.18.0 which is incompatible.\u001b[0m\n",
185 | "\u001b[31mERROR: google-colab 1.0.0 has requirement pandas~=1.1.0; python_version >= \"3.0\", but you'll have pandas 0.25.3 which is incompatible.\u001b[0m\n",
186 | "\u001b[31mERROR: google-colab 1.0.0 has requirement requests~=2.23.0, but you'll have requests 2.22.0 which is incompatible.\u001b[0m\n",
187 | "\u001b[31mERROR: fbprophet 0.7.1 has requirement pandas>=1.0.4, but you'll have pandas 0.25.3 which is incompatible.\u001b[0m\n",
188 | "\u001b[31mERROR: datascience 0.10.6 has requirement folium==0.2.1, but you'll have folium 0.8.3 which is incompatible.\u001b[0m\n",
189 | "\u001b[31mERROR: albumentations 0.1.12 has requirement imgaug<0.2.7,>=0.2.5, but you'll have imgaug 0.2.9 which is incompatible.\u001b[0m\n",
190 | "Installing collected packages: pydantic, sacremoses, numpy, h5py, cryptography, pyopenssl, rusenttokenize, idna, requests, multidict, yarl, pamqp, aiormq, aio-pika, prometheus-client, pymorphy2-dicts-ru, h11, uvloop, httptools, websockets, uvicorn, overrides, pymorphy2-dicts, dawg-python, pymorphy2, pytelegrambotapi, scikit-learn, Cython, ruamel.yaml, nltk, pytz, pandas, starlette, fastapi, deeppavlov\n",
191 | " Found existing installation: numpy 1.19.5\n",
192 | " Uninstalling numpy-1.19.5:\n",
193 | " Successfully uninstalled numpy-1.19.5\n",
194 | " Found existing installation: h5py 3.1.0\n",
195 | " Uninstalling h5py-3.1.0:\n",
196 | " Successfully uninstalled h5py-3.1.0\n",
197 | " Found existing installation: idna 2.10\n",
198 | " Uninstalling idna-2.10:\n",
199 | " Successfully uninstalled idna-2.10\n",
200 | " Found existing installation: requests 2.23.0\n",
201 | " Uninstalling requests-2.23.0:\n",
202 | " Successfully uninstalled requests-2.23.0\n",
203 | " Found existing installation: prometheus-client 0.10.1\n",
204 | " Uninstalling prometheus-client-0.10.1:\n",
205 | " Successfully uninstalled prometheus-client-0.10.1\n",
206 | " Found existing installation: scikit-learn 0.22.2.post1\n",
207 | " Uninstalling scikit-learn-0.22.2.post1:\n",
208 | " Successfully uninstalled scikit-learn-0.22.2.post1\n",
209 | " Found existing installation: Cython 0.29.23\n",
210 | " Uninstalling Cython-0.29.23:\n",
211 | " Successfully uninstalled Cython-0.29.23\n",
212 | " Found existing installation: nltk 3.2.5\n",
213 | " Uninstalling nltk-3.2.5:\n",
214 | " Successfully uninstalled nltk-3.2.5\n",
215 | " Found existing installation: pytz 2018.9\n",
216 | " Uninstalling pytz-2018.9:\n",
217 | " Successfully uninstalled pytz-2018.9\n",
218 | " Found existing installation: pandas 1.1.5\n",
219 | " Uninstalling pandas-1.1.5:\n",
220 | " Successfully uninstalled pandas-1.1.5\n",
221 | "Successfully installed Cython-0.29.14 aio-pika-6.4.1 aiormq-3.3.1 cryptography-3.4.7 dawg-python-0.7.2 deeppavlov-0.15.0 fastapi-0.47.1 h11-0.9.0 h5py-2.10.0 httptools-0.1.2 idna-2.8 multidict-5.1.0 nltk-3.4.5 numpy-1.18.0 overrides-2.7.0 pamqp-2.3.0 pandas-0.25.3 prometheus-client-0.7.1 pydantic-1.3 pymorphy2-0.8 pymorphy2-dicts-2.4.393442.3710985 pymorphy2-dicts-ru-2.4.417127.4579844 pyopenssl-19.1.0 pytelegrambotapi-3.6.7 pytz-2019.1 requests-2.22.0 ruamel.yaml-0.15.100 rusenttokenize-0.0.5 sacremoses-0.0.35 scikit-learn-0.21.2 starlette-0.12.9 uvicorn-0.11.7 uvloop-0.14.0 websockets-8.1 yarl-1.6.3\n"
222 | ],
223 | "name": "stdout"
224 | },
225 | {
226 | "output_type": "display_data",
227 | "data": {
228 | "application/vnd.colab-display-data+json": {
229 | "pip_warning": {
230 | "packages": [
231 | "numpy",
232 | "pandas",
233 | "pytz"
234 | ]
235 | }
236 | }
237 | },
238 | "metadata": {
239 | "tags": []
240 | }
241 | }
242 | ]
243 | },
244 | {
245 | "cell_type": "code",
246 | "metadata": {
247 | "colab": {
248 | "base_uri": "https://localhost:8080/"
249 | },
250 | "id": "u6vD5K2wpw6s",
251 | "outputId": "76f3918e-5f35-4bde-b4d0-abedf68eb51d"
252 | },
253 | "source": [
254 | "! python -m deeppavlov install insults_kaggle_bert"
255 | ],
256 | "execution_count": 3,
257 | "outputs": [
258 | {
259 | "output_type": "stream",
260 | "text": [
261 | "2021-06-12 09:58:59.111 INFO in 'deeppavlov.core.common.file'['file'] at line 32: Interpreting 'insults_kaggle_bert' as '/usr/local/lib/python3.7/dist-packages/deeppavlov/configs/classifiers/insults_kaggle_bert.json'\n",
262 | "Collecting git+https://github.com/deepmipt/bert.git@feat/multi_gpu\n",
263 | " Cloning https://github.com/deepmipt/bert.git (to revision feat/multi_gpu) to /tmp/pip-req-build-t6qt4nmv\n",
264 | " Running command git clone -q https://github.com/deepmipt/bert.git /tmp/pip-req-build-t6qt4nmv\n",
265 | "Building wheels for collected packages: bert-dp\n",
266 | " Building wheel for bert-dp (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
267 | " Created wheel for bert-dp: filename=bert_dp-1.0-cp37-none-any.whl size=23593 sha256=ec33b015876411d547fb83d35f2613c99d0399589c8473c504010af9924ad9a8\n",
268 | " Stored in directory: /tmp/pip-ephem-wheel-cache-2sjowpb2/wheels/1e/41/94/886107eaf932532594886fd8bfc9cb9d4db632e94add49d326\n",
269 | "Successfully built bert-dp\n",
270 | "Installing collected packages: bert-dp\n",
271 | "Successfully installed bert-dp-1.0\n",
272 | "Collecting tensorflow==1.15.2\n",
273 | "\u001b[?25l Downloading https://files.pythonhosted.org/packages/5b/81/84fb7a323f9723f81edfc796d89e89aa95a9446ed7353c144195b3a3a3ba/tensorflow-1.15.2-cp37-cp37m-manylinux2010_x86_64.whl (110.5MB)\n",
274 | "\u001b[K |████████████████████████████████| 110.5MB 98kB/s \n",
275 | "\u001b[?25hRequirement already satisfied: keras-preprocessing>=1.0.5 in /usr/local/lib/python3.7/dist-packages (from tensorflow==1.15.2) (1.1.2)\n",
276 | "Collecting tensorboard<1.16.0,>=1.15.0\n",
277 | "\u001b[?25l Downloading https://files.pythonhosted.org/packages/1e/e9/d3d747a97f7188f48aa5eda486907f3b345cd409f0a0850468ba867db246/tensorboard-1.15.0-py3-none-any.whl (3.8MB)\n",
278 | "\u001b[K |████████████████████████████████| 3.8MB 28.9MB/s \n",
279 | "\u001b[?25hRequirement already satisfied: protobuf>=3.6.1 in /usr/local/lib/python3.7/dist-packages (from tensorflow==1.15.2) (3.12.4)\n",
280 | "Collecting keras-applications>=1.0.8\n",
281 | "\u001b[?25l Downloading https://files.pythonhosted.org/packages/71/e3/19762fdfc62877ae9102edf6342d71b28fbfd9dea3d2f96a882ce099b03f/Keras_Applications-1.0.8-py3-none-any.whl (50kB)\n",
282 | "\u001b[K |████████████████████████████████| 51kB 6.0MB/s \n",
283 | "\u001b[?25hRequirement already satisfied: absl-py>=0.7.0 in /usr/local/lib/python3.7/dist-packages (from tensorflow==1.15.2) (0.12.0)\n",
284 | "Requirement already satisfied: termcolor>=1.1.0 in /usr/local/lib/python3.7/dist-packages (from tensorflow==1.15.2) (1.1.0)\n",
285 | "Requirement already satisfied: wrapt>=1.11.1 in /usr/local/lib/python3.7/dist-packages (from tensorflow==1.15.2) (1.12.1)\n",
286 | "Requirement already satisfied: google-pasta>=0.1.6 in /usr/local/lib/python3.7/dist-packages (from tensorflow==1.15.2) (0.2.0)\n",
287 | "Requirement already satisfied: six>=1.10.0 in /usr/local/lib/python3.7/dist-packages (from tensorflow==1.15.2) (1.15.0)\n",
288 | "Collecting tensorflow-estimator==1.15.1\n",
289 | "\u001b[?25l Downloading https://files.pythonhosted.org/packages/de/62/2ee9cd74c9fa2fa450877847ba560b260f5d0fb70ee0595203082dafcc9d/tensorflow_estimator-1.15.1-py2.py3-none-any.whl (503kB)\n",
290 | "\u001b[K |████████████████████████████████| 512kB 36.4MB/s \n",
291 | "\u001b[?25hRequirement already satisfied: astor>=0.6.0 in /usr/local/lib/python3.7/dist-packages (from tensorflow==1.15.2) (0.8.1)\n",
292 | "Collecting gast==0.2.2\n",
293 | " Downloading https://files.pythonhosted.org/packages/4e/35/11749bf99b2d4e3cceb4d55ca22590b0d7c2c62b9de38ac4a4a7f4687421/gast-0.2.2.tar.gz\n",
294 | "Requirement already satisfied: wheel>=0.26; python_version >= \"3\" in /usr/local/lib/python3.7/dist-packages (from tensorflow==1.15.2) (0.36.2)\n",
295 | "Requirement already satisfied: opt-einsum>=2.3.2 in /usr/local/lib/python3.7/dist-packages (from tensorflow==1.15.2) (3.3.0)\n",
296 | "Requirement already satisfied: numpy<2.0,>=1.16.0 in /usr/local/lib/python3.7/dist-packages (from tensorflow==1.15.2) (1.18.0)\n",
297 | "Requirement already satisfied: grpcio>=1.8.6 in /usr/local/lib/python3.7/dist-packages (from tensorflow==1.15.2) (1.34.1)\n",
298 | "Requirement already satisfied: setuptools>=41.0.0 in /usr/local/lib/python3.7/dist-packages (from tensorboard<1.16.0,>=1.15.0->tensorflow==1.15.2) (57.0.0)\n",
299 | "Requirement already satisfied: werkzeug>=0.11.15 in /usr/local/lib/python3.7/dist-packages (from tensorboard<1.16.0,>=1.15.0->tensorflow==1.15.2) (1.0.1)\n",
300 | "Requirement already satisfied: markdown>=2.6.8 in /usr/local/lib/python3.7/dist-packages (from tensorboard<1.16.0,>=1.15.0->tensorflow==1.15.2) (3.3.4)\n",
301 | "Requirement already satisfied: h5py in /usr/local/lib/python3.7/dist-packages (from keras-applications>=1.0.8->tensorflow==1.15.2) (2.10.0)\n",
302 | "Requirement already satisfied: importlib-metadata; python_version < \"3.8\" in /usr/local/lib/python3.7/dist-packages (from markdown>=2.6.8->tensorboard<1.16.0,>=1.15.0->tensorflow==1.15.2) (4.0.1)\n",
303 | "Requirement already satisfied: zipp>=0.5 in /usr/local/lib/python3.7/dist-packages (from importlib-metadata; python_version < \"3.8\"->markdown>=2.6.8->tensorboard<1.16.0,>=1.15.0->tensorflow==1.15.2) (3.4.1)\n",
304 | "Requirement already satisfied: typing-extensions>=3.6.4; python_version < \"3.8\" in /usr/local/lib/python3.7/dist-packages (from importlib-metadata; python_version < \"3.8\"->markdown>=2.6.8->tensorboard<1.16.0,>=1.15.0->tensorflow==1.15.2) (3.7.4.3)\n",
305 | "Building wheels for collected packages: gast\n",
306 | " Building wheel for gast (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
307 | " Created wheel for gast: filename=gast-0.2.2-cp37-none-any.whl size=7557 sha256=7641b094f3ea5d3eddc1b3cdb4348fdece6c3ac96a6a6b3254ecd93d41cdae1d\n",
308 | " Stored in directory: /root/.cache/pip/wheels/5c/2e/7e/a1d4d4fcebe6c381f378ce7743a3ced3699feb89bcfbdadadd\n",
309 | "Successfully built gast\n",
310 | "\u001b[31mERROR: tensorflow-probability 0.12.1 has requirement gast>=0.3.2, but you'll have gast 0.2.2 which is incompatible.\u001b[0m\n",
311 | "\u001b[31mERROR: kapre 0.3.5 has requirement numpy>=1.18.5, but you'll have numpy 1.18.0 which is incompatible.\u001b[0m\n",
312 | "\u001b[31mERROR: kapre 0.3.5 has requirement tensorflow>=2.0.0, but you'll have tensorflow 1.15.2 which is incompatible.\u001b[0m\n",
313 | "Installing collected packages: tensorboard, keras-applications, tensorflow-estimator, gast, tensorflow\n",
314 | " Found existing installation: tensorboard 2.5.0\n",
315 | " Uninstalling tensorboard-2.5.0:\n",
316 | " Successfully uninstalled tensorboard-2.5.0\n",
317 | " Found existing installation: tensorflow-estimator 2.5.0\n",
318 | " Uninstalling tensorflow-estimator-2.5.0:\n",
319 | " Successfully uninstalled tensorflow-estimator-2.5.0\n",
320 | " Found existing installation: gast 0.4.0\n",
321 | " Uninstalling gast-0.4.0:\n",
322 | " Successfully uninstalled gast-0.4.0\n",
323 | " Found existing installation: tensorflow 2.5.0\n",
324 | " Uninstalling tensorflow-2.5.0:\n",
325 | " Successfully uninstalled tensorflow-2.5.0\n",
326 | "Successfully installed gast-0.2.2 keras-applications-1.0.8 tensorboard-1.15.0 tensorflow-1.15.2 tensorflow-estimator-1.15.1\n"
327 | ],
328 | "name": "stdout"
329 | }
330 | ]
331 | },
332 | {
333 | "cell_type": "code",
334 | "metadata": {
335 | "colab": {
336 | "base_uri": "https://localhost:8080/"
337 | },
338 | "id": "O5rv2Wmipw_-",
339 | "outputId": "7b81b84d-fbec-4b26-a945-0f995e6fdf14"
340 | },
341 | "source": [
342 | "! python -m deeppavlov interact -d insults_kaggle_bert "
343 | ],
344 | "execution_count": 4,
345 | "outputs": [
346 | {
347 | "output_type": "stream",
348 | "text": [
349 | "Traceback (most recent call last):\n",
350 | " File \"/usr/lib/python3.7/runpy.py\", line 193, in _run_module_as_main\n",
351 | " File \"/usr/lib/python3.7/runpy.py\", line 85, in _run_code\n",
352 | " exec(code, run_globals)\n",
353 | " File \"/usr/local/lib/python3.7/dist-packages/deeppavlov/__main__.py\", line 4, in \n",
354 | " main()\n",
355 | " File \"/usr/local/lib/python3.7/dist-packages/deeppavlov/deep.py\", line 89, in main\n",
356 | " interact_model(pipeline_config_path)\n",
357 | " File \"/usr/local/lib/python3.7/dist-packages/deeppavlov/core/commands/infer.py\", line 84, in interact_model\n",
358 | " args.append((input('{}::'.format(in_x)),))\n",
359 | "KeyboardInterrupt\n",
360 | "^C\n"
361 | ],
362 | "name": "stdout"
363 | }
364 | ]
365 | },
366 | {
367 | "cell_type": "code",
368 | "metadata": {
369 | "colab": {
370 | "base_uri": "https://localhost:8080/"
371 | },
372 | "id": "2zCix72fpxM9",
373 | "outputId": "d371e493-9ba4-487a-b06d-9f1ad3072de9"
374 | },
375 | "source": [
376 | "from deeppavlov import build_model, configs\n",
377 | "model = build_model(configs.classifiers.insults_kaggle_bert, download = False )"
378 | ],
379 | "execution_count": 5,
380 | "outputs": [
381 | {
382 | "output_type": "stream",
383 | "text": [
384 | "[nltk_data] Downloading package punkt to /root/nltk_data...\n",
385 | "[nltk_data] Package punkt is already up-to-date!\n",
386 | "[nltk_data] Downloading package stopwords to /root/nltk_data...\n",
387 | "[nltk_data] Package stopwords is already up-to-date!\n",
388 | "[nltk_data] Downloading package perluniprops to /root/nltk_data...\n",
389 | "[nltk_data] Package perluniprops is already up-to-date!\n",
390 | "[nltk_data] Downloading package nonbreaking_prefixes to\n",
391 | "[nltk_data] /root/nltk_data...\n",
392 | "[nltk_data] Package nonbreaking_prefixes is already up-to-date!\n"
393 | ],
394 | "name": "stderr"
395 | },
396 | {
397 | "output_type": "stream",
398 | "text": [
399 | "WARNING:tensorflow:From /usr/local/lib/python3.7/dist-packages/bert_dp/tokenization.py:125: The name tf.gfile.GFile is deprecated. Please use tf.io.gfile.GFile instead.\n",
400 | "\n"
401 | ],
402 | "name": "stdout"
403 | },
404 | {
405 | "output_type": "stream",
406 | "text": [
407 | "2021-06-12 10:06:46.107 INFO in 'deeppavlov.core.data.simple_vocab'['simple_vocab'] at line 115: [loading vocabulary from /root/.deeppavlov/models/classifiers/insults_kaggle_v3/classes.dict]\n"
408 | ],
409 | "name": "stderr"
410 | },
411 | {
412 | "output_type": "stream",
413 | "text": [
414 | "WARNING:tensorflow:From /usr/local/lib/python3.7/dist-packages/deeppavlov/core/models/tf_model.py:37: The name tf.Session is deprecated. Please use tf.compat.v1.Session instead.\n",
415 | "\n",
416 | "WARNING:tensorflow:From /usr/local/lib/python3.7/dist-packages/deeppavlov/core/models/tf_model.py:222: The name tf.placeholder is deprecated. Please use tf.compat.v1.placeholder instead.\n",
417 | "\n",
418 | "WARNING:tensorflow:From /usr/local/lib/python3.7/dist-packages/deeppavlov/core/models/tf_model.py:222: The name tf.train.Optimizer is deprecated. Please use tf.compat.v1.train.Optimizer instead.\n",
419 | "\n",
420 | "WARNING:tensorflow:From /usr/local/lib/python3.7/dist-packages/deeppavlov/core/models/tf_model.py:193: The name tf.train.AdamOptimizer is deprecated. Please use tf.compat.v1.train.AdamOptimizer instead.\n",
421 | "\n",
422 | "WARNING:tensorflow:From /usr/local/lib/python3.7/dist-packages/deeppavlov/models/bert/bert_classifier.py:84: The name tf.ConfigProto is deprecated. Please use tf.compat.v1.ConfigProto instead.\n",
423 | "\n",
424 | "WARNING:tensorflow:From /usr/local/lib/python3.7/dist-packages/deeppavlov/models/bert/bert_classifier.py:161: The name tf.placeholder_with_default is deprecated. Please use tf.compat.v1.placeholder_with_default instead.\n",
425 | "\n",
426 | "WARNING:tensorflow:From /usr/local/lib/python3.7/dist-packages/bert_dp/modeling.py:178: The name tf.variable_scope is deprecated. Please use tf.compat.v1.variable_scope instead.\n",
427 | "\n",
428 | "WARNING:tensorflow:From /usr/local/lib/python3.7/dist-packages/bert_dp/modeling.py:418: The name tf.get_variable is deprecated. Please use tf.compat.v1.get_variable instead.\n",
429 | "\n",
430 | "WARNING:tensorflow:From /usr/local/lib/python3.7/dist-packages/bert_dp/modeling.py:499: The name tf.assert_less_equal is deprecated. Please use tf.compat.v1.assert_less_equal instead.\n",
431 | "\n",
432 | "WARNING:tensorflow:\n",
433 | "The TensorFlow contrib module will not be included in TensorFlow 2.0.\n",
434 | "For more information, please see:\n",
435 | " * https://github.com/tensorflow/community/blob/master/rfcs/20180907-contrib-sunset.md\n",
436 | " * https://github.com/tensorflow/addons\n",
437 | " * https://github.com/tensorflow/io (for I/O related ops)\n",
438 | "If you depend on functionality not listed there, please file an issue.\n",
439 | "\n",
440 | "WARNING:tensorflow:From /usr/local/lib/python3.7/dist-packages/bert_dp/modeling.py:366: calling dropout (from tensorflow.python.ops.nn_ops) with keep_prob is deprecated and will be removed in a future version.\n",
441 | "Instructions for updating:\n",
442 | "Please use `rate` instead of `keep_prob`. Rate should be set to `rate = 1 - keep_prob`.\n",
443 | "WARNING:tensorflow:From /usr/local/lib/python3.7/dist-packages/bert_dp/modeling.py:680: dense (from tensorflow.python.layers.core) is deprecated and will be removed in a future version.\n",
444 | "Instructions for updating:\n",
445 | "Use keras.layers.Dense instead.\n",
446 | "WARNING:tensorflow:From /usr/local/lib/python3.7/dist-packages/tensorflow_core/python/layers/core.py:187: Layer.apply (from tensorflow.python.keras.engine.base_layer) is deprecated and will be removed in a future version.\n",
447 | "Instructions for updating:\n",
448 | "Please use `layer.__call__` method instead.\n",
449 | "WARNING:tensorflow:From /usr/local/lib/python3.7/dist-packages/bert_dp/modeling.py:283: The name tf.erf is deprecated. Please use tf.math.erf instead.\n",
450 | "\n",
451 | "WARNING:tensorflow:From /usr/local/lib/python3.7/dist-packages/deeppavlov/core/models/tf_model.py:234: The name tf.train.AdadeltaOptimizer is deprecated. Please use tf.compat.v1.train.AdadeltaOptimizer instead.\n",
452 | "\n",
453 | "WARNING:tensorflow:From /usr/local/lib/python3.7/dist-packages/deeppavlov/core/models/tf_model.py:127: The name tf.get_collection is deprecated. Please use tf.compat.v1.get_collection instead.\n",
454 | "\n",
455 | "WARNING:tensorflow:From /usr/local/lib/python3.7/dist-packages/deeppavlov/core/models/tf_model.py:127: The name tf.GraphKeys is deprecated. Please use tf.compat.v1.GraphKeys instead.\n",
456 | "\n",
457 | "WARNING:tensorflow:From /usr/local/lib/python3.7/dist-packages/deeppavlov/models/bert/bert_classifier.py:92: The name tf.global_variables_initializer is deprecated. Please use tf.compat.v1.global_variables_initializer instead.\n",
458 | "\n",
459 | "WARNING:tensorflow:From /usr/local/lib/python3.7/dist-packages/deeppavlov/models/bert/bert_classifier.py:97: checkpoint_exists (from tensorflow.python.training.checkpoint_management) is deprecated and will be removed in a future version.\n",
460 | "Instructions for updating:\n",
461 | "Use standard file APIs to check for files with this prefix.\n"
462 | ],
463 | "name": "stdout"
464 | },
465 | {
466 | "output_type": "stream",
467 | "text": [
468 | "2021-06-12 10:07:08.946 INFO in 'deeppavlov.core.models.tf_model'['tf_model'] at line 51: [loading model from /root/.deeppavlov/models/classifiers/insults_kaggle_v3/model]\n"
469 | ],
470 | "name": "stderr"
471 | },
472 | {
473 | "output_type": "stream",
474 | "text": [
475 | "WARNING:tensorflow:From /usr/local/lib/python3.7/dist-packages/deeppavlov/core/models/tf_model.py:54: The name tf.train.Saver is deprecated. Please use tf.compat.v1.train.Saver instead.\n",
476 | "\n",
477 | "INFO:tensorflow:Restoring parameters from /root/.deeppavlov/models/classifiers/insults_kaggle_v3/model\n"
478 | ],
479 | "name": "stdout"
480 | }
481 | ]
482 | },
483 | {
484 | "cell_type": "code",
485 | "metadata": {
486 | "colab": {
487 | "base_uri": "https://localhost:8080/"
488 | },
489 | "id": "oHk1KPYSpxx4",
490 | "outputId": "3b82fb18-db7a-4e84-fc01-73dc3d16e4bc"
491 | },
492 | "source": [
493 | "model(['hey are you a bvpian?','fuck your mom'])"
494 | ],
495 | "execution_count": 8,
496 | "outputs": [
497 | {
498 | "output_type": "execute_result",
499 | "data": {
500 | "text/plain": [
501 | "['Insult', 'Insult']"
502 | ]
503 | },
504 | "metadata": {
505 | "tags": []
506 | },
507 | "execution_count": 8
508 | }
509 | ]
510 | },
511 | {
512 | "cell_type": "code",
513 | "metadata": {
514 | "colab": {
515 | "base_uri": "https://localhost:8080/"
516 | },
517 | "id": "xbV6LFOMpx_i",
518 | "outputId": "56d6b299-3b9d-4172-8941-bea607c245e2"
519 | },
520 | "source": [
521 | "import json\n",
522 | "from pprint import pprint\n",
523 | "model_config = json.load(open(configs.classifiers.insults_kaggle_bert))\n",
524 | "\n",
525 | "pprint(model_config['dataset_reader'])\n",
526 | "pprint(model_config['metadata']['variables'])"
527 | ],
528 | "execution_count": 9,
529 | "outputs": [
530 | {
531 | "output_type": "stream",
532 | "text": [
533 | "{'class_name': 'basic_classification_reader',\n",
534 | " 'data_path': '{DOWNLOADS_PATH}/insults_data',\n",
535 | " 'x': 'Comment',\n",
536 | " 'y': 'Class'}\n",
537 | "{'DOWNLOADS_PATH': '{ROOT_PATH}/downloads',\n",
538 | " 'MODELS_PATH': '{ROOT_PATH}/models',\n",
539 | " 'MODEL_PATH': '{MODELS_PATH}/classifiers/insults_kaggle_v3',\n",
540 | " 'ROOT_PATH': '~/.deeppavlov'}\n"
541 | ],
542 | "name": "stdout"
543 | }
544 | ]
545 | },
546 | {
547 | "cell_type": "code",
548 | "metadata": {
549 | "colab": {
550 | "base_uri": "https://localhost:8080/"
551 | },
552 | "id": "AriCCuRNsZhE",
553 | "outputId": "7f0e401f-f41d-4c36-a3a1-424411746afe"
554 | },
555 | "source": [
556 | "! ls ~/.deeppavlov/downloads/insults_data/"
557 | ],
558 | "execution_count": 10,
559 | "outputs": [
560 | {
561 | "output_type": "stream",
562 | "text": [
563 | "test.csv train.csv valid.csv\n"
564 | ],
565 | "name": "stdout"
566 | }
567 | ]
568 | },
569 | {
570 | "cell_type": "code",
571 | "metadata": {
572 | "colab": {
573 | "base_uri": "https://localhost:8080/"
574 | },
575 | "id": "q-S3QTohpyDU",
576 | "outputId": "4181b3cf-2aac-440b-90b2-11ed44019180"
577 | },
578 | "source": [
579 | "! head ~/.deeppavlov/downloads/insults_data/train.csv"
580 | ],
581 | "execution_count": 11,
582 | "outputs": [
583 | {
584 | "output_type": "stream",
585 | "text": [
586 | "Comment,Class\n",
587 | "\"\"\"You fuck your dad.\"\"\",Insult\n",
588 | "\"\"\"i really don't understand your point.\\xa0 It seems that you are mixing apples and oranges.\"\"\",Not Insult\n",
589 | "\"\"\"A\\\\xc2\\\\xa0majority of Canadians can and has been wrong before now and will be again.\\\\n\\\\nUnless you're supportive of the idea that nothing is full proof or perfect so you take your chances and if we should inadvertently kill your son or daughter then them's the breaks and we can always regard you as collateral damage like in wartime - and sorry, but\\\\xc2\\\\xa0the cheques in the mail. \"\"\",Not Insult\n",
590 | "\"\"\"listen if you dont wanna get married to a man or a women DONT DO IT. what would it bother you if gay people got married stay in your lane do you let them do them. And your god is so nice but quick to judg if your not like him, thought you wasnt suppose to judge people.\"\"\",Not Insult\n",
591 | "\"\"\"C\\xe1c b\\u1ea1n xu\\u1ed1ng \\u0111\\u01b0\\u1eddng bi\\u1ec3u t\\xecnh 2011 c\\xf3 \\xf4n ho\\xe0 kh\\xf4ng ? \\nC\\xe1c ng\\u01b0 d\\xe2n ng\\u1ed3i cu\\xed \\u0111\\u1ea7u chi\\u1ee5 nh\\u1ee5c c\\xf3 \\xf4n ho\\xe0 kh\\xf4ng ?\\nC\\xe1c n\\xf4ng d\\xe2n gi\\u1eef \\u0111\\u1ea5t \\u1edf V\\u0103n Giang, C\\u1ea7n Th\\u01a1 c\\xf3 \\xf4n ho\\xe0 kh\\xf4ng ?\\n.................\\nR\\u1ed1t cu\\u1ed9c \\u0111\\u01b0\\u1ee3c g\\xec\\xa0 th\\xec ch\\xfang ta \\u0111\\xe3 bi\\u1ebft !\\nAi c\\u0169ng y\\xeau chu\\u1ed9ng ho\\xe0 b\\xecnh, nh\\u01b0ng \\u0111\\xf4i khi ho\\xe0 b\\xecnh ch\\u1ec9 th\\u1eadt s\\u1ef1 \\u0111\\u1ebfn sau chi\\u1ebfn tranh m\\xe0 th\\xf4i.\\nKh\\xf4ng c\\xf2n con \\u0111\\u01b0\\u1eddng n\\xe0o ch\\u1ecdn kh\\xe1c \\u0111\\xe2u, \\u0111\\u1eebng m\\u01a1 th\\xeam n\\u01b0\\xe3.\"\"\",Not Insult\n",
592 | "\"\"\"@SDL OK, but I would hope they'd sign him to a one-year contract to start with. Give him the chance to be reliable and productive, but give themselves the out if all his time off has hurt his playing skills or if he falls back into old habits.\"\"\",Not Insult\n",
593 | "\"\"\"Yeah and where are you now?\"\"\",Not Insult\n",
594 | "\"\"\"shut the fuck up. you and the rest of your faggot friends should be burned at the stake\"\"\",Insult\n",
595 | "\"\"\"Either you are fake or extremely stupid...maybe both...\"\"\",Insult\n"
596 | ],
597 | "name": "stdout"
598 | }
599 | ]
600 | },
601 | {
602 | "cell_type": "code",
603 | "metadata": {
604 | "id": "46SW082SpyLR"
605 | },
606 | "source": [
607 | ""
608 | ],
609 | "execution_count": null,
610 | "outputs": []
611 | },
612 | {
613 | "cell_type": "code",
614 | "metadata": {
615 | "id": "_VF-gJxOpyOs"
616 | },
617 | "source": [
618 | ""
619 | ],
620 | "execution_count": null,
621 | "outputs": []
622 | },
623 | {
624 | "cell_type": "code",
625 | "metadata": {
626 | "id": "LnUx4IxppySe"
627 | },
628 | "source": [
629 | ""
630 | ],
631 | "execution_count": null,
632 | "outputs": []
633 | },
634 | {
635 | "cell_type": "code",
636 | "metadata": {
637 | "id": "khAkPo0EpyWE"
638 | },
639 | "source": [
640 | ""
641 | ],
642 | "execution_count": null,
643 | "outputs": []
644 | },
645 | {
646 | "cell_type": "code",
647 | "metadata": {
648 | "id": "xwoHhbE-pyZR"
649 | },
650 | "source": [
651 | ""
652 | ],
653 | "execution_count": null,
654 | "outputs": []
655 | },
656 | {
657 | "cell_type": "code",
658 | "metadata": {
659 | "id": "eNKQEFH9pyco"
660 | },
661 | "source": [
662 | ""
663 | ],
664 | "execution_count": null,
665 | "outputs": []
666 | },
667 | {
668 | "cell_type": "code",
669 | "metadata": {
670 | "id": "pZqOs9vkpygA"
671 | },
672 | "source": [
673 | ""
674 | ],
675 | "execution_count": null,
676 | "outputs": []
677 | },
678 | {
679 | "cell_type": "code",
680 | "metadata": {
681 | "id": "HFxcTTcNpyjS"
682 | },
683 | "source": [
684 | ""
685 | ],
686 | "execution_count": null,
687 | "outputs": []
688 | },
689 | {
690 | "cell_type": "code",
691 | "metadata": {
692 | "id": "i41_ZlT5pymy"
693 | },
694 | "source": [
695 | ""
696 | ],
697 | "execution_count": null,
698 | "outputs": []
699 | }
700 | ]
701 | }
--------------------------------------------------------------------------------