Refer to the code repository and paper here:
GitHub - Insensitive-Lang-Detection
This is a fine-tuned BERT model designed to detect potentially insensitive or non-inclusive language relating to disability, specifically in academic and scholarly writing.
The model helps promote more inclusive and respectful communication, aligning with social models of disability and various international guidelines.
This model is licensed under the Creative Commons Attribution-NonCommercial 4.0 International (CC BY-NC 4.0) license.
This means you are free to share and adapt the model for non-commercial purposes, as long as appropriate credit is given. Commercial use is not permitted without explicit permission.
1from transformers import BertForSequenceClassification, BertTokenizer
2
3model = BertForSequenceClassification.from_pretrained("rrroby/insensitive-language-bert")
4tokenizer = BertTokenizer.from_pretrained("rrroby/insensitive-language-bert")
5
6text = "This participant was wheelchair-bound and..."
7inputs = tokenizer(text, return_tensors="pt", truncation=True, padding=True, max_length=512)
8outputs = model(**inputs)
9logits = outputs.logits
10predicted_class = logits.argmax(-1).item()
11
12print("Predicted class:", predicted_class)
13
14