LABEL_0 LABEL_1 LABEL_10 LABEL_100 LABEL_101 LABEL_102 LABEL_103 LABEL_104 LABEL_105 LABEL_106 LABEL_107 LABEL_108 LABEL_109 LABEL_11 LABEL_110 LABEL_111 LABEL_112 LABEL_113 LABEL_114 LABEL_115 LABEL_116 LABEL_117 LABEL_118 LABEL_119 LABEL_12 LABEL_120 LABEL_121 LABEL_122 LABEL_123 LABEL_124 LABEL_125 LABEL_126 LABEL_127 LABEL_128 LABEL_129 LABEL_13 LABEL_130 LABEL_131 LABEL_132 LABEL_133 LABEL_134 LABEL_135 LABEL_136 LABEL_137 LABEL_138 LABEL_139 LABEL_14 LABEL_140 LABEL_141 LABEL_142 LABEL_143 LABEL_144 LABEL_145 LABEL_146 LABEL_147 LABEL_148 LABEL_149 LABEL_15 LABEL_150 LABEL_151 LABEL_152 LABEL_153 LABEL_154 LABEL_155 LABEL_156 LABEL_157 LABEL_158 LABEL_159 LABEL_16 LABEL_160 LABEL_161 LABEL_162 LABEL_163 LABEL_164 LABEL_165 LABEL_166 LABEL_167 LABEL_168 LABEL_169 LABEL_17 LABEL_170 LABEL_171 LABEL_172 LABEL_173 LABEL_174 LABEL_175 LABEL_176 LABEL_177 LABEL_178 LABEL_179 LABEL_18 LABEL_180 LABEL_181 LABEL_182 LABEL_183 LABEL_184 LABEL_185 LABEL_186 LABEL_187 LABEL_188 LABEL_189 LABEL_19 LABEL_190 LABEL_191 LABEL_192 LABEL_193 LABEL_194 LABEL_195 LABEL_196 LABEL_197 LABEL_198 LABEL_199 LABEL_2 LABEL_20 LABEL_200 LABEL_201 LABEL_202 LABEL_203 LABEL_204 LABEL_205 LABEL_206 LABEL_207 LABEL_208 LABEL_209 LABEL_21 LABEL_210 LABEL_211 LABEL_212 LABEL_213 LABEL_214 LABEL_215 LABEL_216 LABEL_217 LABEL_218 LABEL_219 LABEL_22 LABEL_220 LABEL_221 LABEL_222 LABEL_223 LABEL_224 LABEL_225 LABEL_226 LABEL_227 LABEL_228 LABEL_229 LABEL_23 LABEL_230 LABEL_231 LABEL_232 LABEL_233 LABEL_234 LABEL_235 LABEL_236 LABEL_237 LABEL_238 LABEL_239 LABEL_24 LABEL_240 LABEL_241 LABEL_242 LABEL_243 LABEL_244 LABEL_245 LABEL_246 LABEL_247 LABEL_248 LABEL_249 LABEL_25 LABEL_250 LABEL_251 LABEL_252 LABEL_253 LABEL_254 LABEL_255 LABEL_256 LABEL_257 LABEL_258 LABEL_259 LABEL_26 LABEL_260 LABEL_261 LABEL_262 LABEL_263 LABEL_264 LABEL_265 LABEL_266 LABEL_267 LABEL_268 LABEL_269 LABEL_27 LABEL_270 LABEL_271 LABEL_272 LABEL_273 LABEL_274 LABEL_275 LABEL_276 LABEL_277 LABEL_278 LABEL_279 LABEL_28 LABEL_280 LABEL_281 LABEL_282 LABEL_283 LABEL_284 LABEL_285 LABEL_286 LABEL_287 LABEL_288 LABEL_289 LABEL_29 LABEL_290 LABEL_291 LABEL_292 LABEL_293 LABEL_294 LABEL_295 LABEL_296 LABEL_297 LABEL_298 LABEL_299 LABEL_3 LABEL_30 LABEL_300 LABEL_301 LABEL_302 LABEL_303 LABEL_304 LABEL_305 LABEL_306 LABEL_307 LABEL_308 LABEL_309 LABEL_31 LABEL_310 LABEL_311 LABEL_312 LABEL_313 LABEL_314 LABEL_315 LABEL_316 LABEL_317 LABEL_318 LABEL_319 LABEL_32 LABEL_320 LABEL_321 LABEL_322 LABEL_323 LABEL_324 LABEL_325 LABEL_326 LABEL_327 LABEL_328 LABEL_329 LABEL_33 LABEL_330 LABEL_331 LABEL_332 LABEL_333 LABEL_334 LABEL_335 LABEL_336 LABEL_337 LABEL_338 LABEL_339 LABEL_34 LABEL_340 LABEL_341 LABEL_342 LABEL_343 LABEL_344 LABEL_345 LABEL_346 LABEL_347 LABEL_348 LABEL_349 LABEL_35 LABEL_350 LABEL_351 LABEL_352 LABEL_353 LABEL_354 LABEL_355 LABEL_356 LABEL_357 LABEL_358 LABEL_359 LABEL_36 LABEL_360 LABEL_361 LABEL_362 LABEL_363 LABEL_364 LABEL_365 LABEL_366 LABEL_367 LABEL_368 LABEL_369 LABEL_37 LABEL_370 LABEL_371 LABEL_372 LABEL_373 LABEL_374 LABEL_375 LABEL_376 LABEL_377 LABEL_378 LABEL_379 LABEL_38 LABEL_380 LABEL_381 LABEL_382 LABEL_383 LABEL_384 LABEL_385 LABEL_386 LABEL_387 LABEL_388 LABEL_389 LABEL_39 LABEL_390 LABEL_391 LABEL_392 LABEL_4 LABEL_40 LABEL_41 LABEL_42 LABEL_43 LABEL_44 LABEL_45 LABEL_46 LABEL_47 LABEL_48 LABEL_49 LABEL_5 LABEL_50 LABEL_51 LABEL_52 LABEL_53 LABEL_54 LABEL_55 LABEL_56 LABEL_57 LABEL_58 LABEL_59 LABEL_6 LABEL_60 LABEL_61 LABEL_62 LABEL_63 LABEL_64 LABEL_65 LABEL_66 LABEL_67 LABEL_68 LABEL_69 LABEL_7 LABEL_70 LABEL_71 LABEL_72 LABEL_73 LABEL_74 LABEL_75 LABEL_76 LABEL_77 LABEL_78 LABEL_79 LABEL_8 LABEL_80 LABEL_81 LABEL_82 LABEL_83 LABEL_84 LABEL_85 LABEL_86 LABEL_87 LABEL_88 LABEL_89 LABEL_9 LABEL_90 LABEL_91 LABEL_92 LABEL_93 LABEL_94 LABEL_95 LABEL_96 LABEL_97 LABEL_98 LABEL_99
---
language:
- ru

tags:
- toxic comments classification

licenses:
- cc-by-nc-sa
---

## General concept of the model

This model is trained on the dataset of sensitive topics of the Russian language. The concept of sensitive topics is described [in this article ](https://www.aclweb.org/anthology/2021.bsnlp-1.4/) presented at the workshop for Balto-Slavic NLP at the EACL-2021 conference. Please note that this article describes the first version of the dataset, while the model is trained on the extended version of the dataset open-sourced on our [GitHub](https://github.com/skoltech-nlp/inappropriate-sensitive-topics/blob/main/Version2/sensitive_topics/sensitive_topics.csv) or on [kaggle](https://www.kaggle.com/nigula/russian-sensitive-topics). The properties of the dataset is the same as the one described in the article, the only difference is the size.


## Instructions

The model predicts combinations of 18 sensitive topics described in the [article](https://arxiv.org/abs/2103.05345). You can find step-by-step instructions for using the model [here](https://github.com/skoltech-nlp/inappropriate-sensitive-topics/blob/main/Version2/sensitive_topics/Inference.ipynb)


## Metrics

The dataset partially manually labeled samples and partially semi-automatically labeled samples. Learn more in our article. We tested the performance of the classifier only on the part of manually labeled data that is why some topics are not well represented in the test set.


|                   | precision | recall | f1-score | support |
|-------------------|-----------|--------|----------|---------|
| offline_crime     |      0.65 |   0.55 |      0.6 |     132 |
| online_crime      |       0.5 |   0.46 |     0.48 |      37 |
| drugs             |      0.87 |    0.9 |     0.88 |      87 |
| gambling          |       0.5 |   0.67 |     0.57 |       6 |
| pornography       |      0.73 |   0.59 |     0.65 |     204 |
| prostitution      |      0.75 |   0.69 |     0.72 |      91 |
| slavery           |      0.72 |   0.72 |     0.73 |      40 |
| suicide           |      0.33 |   0.29 |     0.31 |       7 |
| terrorism         |      0.68 |   0.57 |     0.62 |      47 |
| weapons           |      0.89 |   0.83 |     0.86 |     138 |
| body_shaming      |       0.9 |   0.67 |     0.77 |     109 |
| health_shaming    |      0.84 |   0.55 |     0.66 |     108 |
| politics          |      0.68 |   0.54 |      0.6 |     241 |
| racism            |      0.81 |   0.59 |     0.68 |     204 |
| religion          |      0.94 |   0.72 |     0.81 |     102 |
| sexual_minorities |      0.69 |   0.46 |     0.55 |     102 |
| sexism            |      0.66 |   0.64 |     0.65 |     132 |
| social_injustice  |      0.56 |   0.37 |     0.45 |     181 |
| none              |      0.62 |   0.67 |     0.64 |     250 |
| micro avg         |      0.72 |   0.61 |     0.66 |    2218 |
| macro avg         |       0.7 |    0.6 |     0.64 |    2218 |
| weighted avg      |      0.73 |   0.61 |     0.66 |    2218 |
| samples avg       |      0.75 |   0.66 |     0.68 |    2218 |

## Licensing Information

[Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License][cc-by-nc-sa].

[![CC BY-NC-SA 4.0][cc-by-nc-sa-image]][cc-by-nc-sa]

[cc-by-nc-sa]: http://creativecommons.org/licenses/by-nc-sa/4.0/
[cc-by-nc-sa-image]: https://i.creativecommons.org/l/by-nc-sa/4.0/88x31.png

## Citation

If you find this repository helpful, feel free to cite our publication:

```
@inproceedings{babakov-etal-2021-detecting,
    title = "Detecting Inappropriate Messages on Sensitive Topics that Could Harm a Company{'}s Reputation",
    author = "Babakov, Nikolay  and
      Logacheva, Varvara  and
      Kozlova, Olga  and
      Semenov, Nikita  and
      Panchenko, Alexander",
    booktitle = "Proceedings of the 8th Workshop on Balto-Slavic Natural Language Processing",
    month = apr,
    year = "2021",
    address = "Kiyv, Ukraine",
    publisher = "Association for Computational Linguistics",
    url = "https://www.aclweb.org/anthology/2021.bsnlp-1.4",
    pages = "26--36",
    abstract = "Not all topics are equally {``}flammable{''} in terms of toxicity: a calm discussion of turtles or fishing less often fuels inappropriate toxic dialogues than a discussion of politics or sexual minorities. We define a set of sensitive topics that can yield inappropriate and toxic messages and describe the methodology of collecting and labelling a dataset for appropriateness. While toxicity in user-generated data is well-studied, we aim at defining a more fine-grained notion of inappropriateness. The core of inappropriateness is that it can harm the reputation of a speaker. This is different from toxicity in two respects: (i) inappropriateness is topic-related, and (ii) inappropriate message is not toxic but still unacceptable. We collect and release two datasets for Russian: a topic-labelled dataset and an appropriateness-labelled dataset. We also release pre-trained classification models trained on this data.",
}
```