Downloads · 30 days
61
2% of all-time downloads
tesemnikov-av/rubert-ner-toxicity
rubert-ner-toxicity is a token classification model from tesemnikov-av. Use it when you need labels on individual words, such as names. It is set up for transformers.
Downloads · 30 days
61
2% of all-time downloads
All-time downloads
2.9K
Public
Repo size
103 MB
Likes
2
Public
Click a slice to open those files.
.bin46.8 MB · 82%
From the Hugging Face model README
NER Toxic models
Fine-tuning cointegrated/rubert-tiny-toxicity model on data from toxic_dataset_ner
language: RU
!pip install transformers > /dev/null
from transformers import (
AutoModelForTokenClassification,
AutoTokenizer,
pipeline
)
model = AutoModelForTokenClassification.from_pretrained('tesemnikov-av/rubert-ner-toxicity')
tokenizer = AutoTokenizer.from_pretrained('tesemnikov-av/rubert-ner-toxicity')
pipe = pipeline(model=model, tokenizer=tokenizer, task='ner', aggregation_strategy='average')
text = "Они охриневшие там все придурки!!"
print(text)
print(pipe(text))