Instructions to use jorgeortizv/BERT-hateSpeechRecognition-German with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use jorgeortizv/BERT-hateSpeechRecognition-German with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="jorgeortizv/BERT-hateSpeechRecognition-German")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("jorgeortizv/BERT-hateSpeechRecognition-German") model = AutoModelForSequenceClassification.from_pretrained("jorgeortizv/BERT-hateSpeechRecognition-German") - Notebooks
- Google Colab
- Kaggle
Fine tunning of bert-base-german-cased[1] using the HASOC dataset[2] to detect hate speech, specifically in german language.
Interpreting results:
- Label 0 -> No hate speech detected
- Label 1 -> Hate speech detected
References:
[1] Chan, B. Möller, T. Pietsch, M. et al. (2019). bert-base-german-cased. Retrieved from: https://huggingface.co/bert-base-german-cased
[2] Mandl, T. Modha, S., Shahi, G., et al. (2020). Overview of the HASOC track at FIRE 2020: Hate Speech and Offensive Content Identification in Indo-European Languages. Forum for Information Retrieval Evaluation. Dataset retrieved from: https://hasocfire.github.io/hasoc/2019/dataset.html
- Downloads last month
- 7