Instructions to use cardiffnlp/pcl_robertabase with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use cardiffnlp/pcl_robertabase with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="cardiffnlp/pcl_robertabase")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("cardiffnlp/pcl_robertabase") model = AutoModelForSequenceClassification.from_pretrained("cardiffnlp/pcl_robertabase", device_map="auto") - Notebooks
- Google Colab
- Kaggle
| language: | |
| - en | |
| ## PCL | |
| Someone uses __Patronizing and Condescending Language (PCL)__ when their use of the language denotes a superior attitude towards someone else, or depicts them in a compassionate way, raising a feeling of pity among the audience. | |
| ## pcl-roberta-base model for PCL detection | |
| This model is trained on __Don't Patronize Me!__ , a dataset of paragraphs extracted from media articles about vulnerable communities, published in 20 English-speaking countries or areas. The paragraphs have been manually annotated to assess if they contain any type of PCL. | |
| This is the PCL detection model built on roBERTa-base. | |
| - Git Repo: [Don't Patronize Me! official repository](https://github.com/Perez-AlmendrosC/dontpatronizeme) | |
| - Dataset: This model has been finetuned with the [Don't Patronize Me! dataset, available here](https://huggingface.co/datasets/carlaperez/dontpatronizeme_pcl) | |
| <b>Labels</b>: | |
| 0 -> Negative; | |
| 1 -> Positive | |
| To know more about our work on PCL detection, the PCL detection model and the dataset, please refer to: | |
| ## Reference Papers: | |
| ``` | |
| @inproceedings{perez2020don, | |
| title={Don’t Patronize Me! An Annotated Dataset with Patronizing and Condescending Language towards Vulnerable Communities}, | |
| author={P{\'e}rez-Almendros, Carla and Anke, Luis Espinosa and Schockaert, Steven}, | |
| booktitle={Proceedings of the 28th International Conference on Computational Linguistics}, | |
| pages={5891--5902}, | |
| year={2020} | |
| } | |
| ``` | |
| ``` | |
| @inproceedings{perez2022semeval, | |
| title={SemEval-2022 task 4: Patronizing and condescending language detection}, | |
| author={P{\'e}rez-Almendros, Carla and Anke, Luis Espinosa and Schockaert, Steven}, | |
| booktitle={Proceedings of the 16th International Workshop on Semantic Evaluation (SemEval-2022)}, | |
| pages={298--307}, | |
| year={2022} | |
| } | |
| ``` | |
| ``` | |
| @inproceedings{perez2022identifying, | |
| title={Identifying condescending language: A tale of two distinct phenomena?}, | |
| author={Perez-Almendros, Carla and Schockaert, Steven}, | |
| booktitle={Proceedings of the Second Workshop on NLP for Positive Impact (NLP4PI)}, | |
| pages={130--141}, | |
| year={2022} | |
| } | |
| ``` | |