xlm-roberta-large-ontolisst-minor-v3
How to use the model
from transformers import AutoTokenizer, pipeline
tokenizer = AutoTokenizer.from_pretrained("xlm-roberta-large")
pipe = pipeline(
model="poltextlab/xlm-roberta-large-ontolisst-minor-v3",
task="text-classification",
tokenizer=tokenizer,
use_fast=False,
token="<your_hf_read_only_token>"
)
text = "<text_to_classify>"
pipe(text)
Classification Report
Overall Performance:
- Accuracy: 80%
- Macro Avg: Precision: 0.80, Recall: 0.79, F1-score: 0.79
- Weighted Avg: Precision: 0.80, Recall: 0.80, F1-score: 0.80
Per-Class Metrics:
| Label | Precision | Recall | F1-score | Support |
|---|---|---|---|---|
| (201) Housing and accommodation | 0.74 | 0.78 | 0.76 | 50 |
| (202) Residential environment and infrastructure | 0.93 | 0.8 | 0.86 | 50 |
| (203) Environmental issues and energy consumption | 0.86 | 0.96 | 0.91 | 50 |
| (204) Technology | 0.91 | 0.8 | 0.85 | 25 |
| (301) Health condition and medical history | 0.74 | 0.7 | 0.72 | 50 |
| (302) Health behaviour | 0.9 | 0.86 | 0.88 | 50 |
| (303) Health care and social services | 0.76 | 0.78 | 0.77 | 50 |
| (304) General wellbeing | 0.83 | 0.95 | 0.88 | 40 |
| (305) Informal care work | 1 | 0.5 | 0.67 | 6 |
| (401) Work organisation and conditions | 0.63 | 0.78 | 0.7 | 50 |
| (402) Employment status and work history | 0.54 | 0.74 | 0.63 | 50 |
| (403) Domestic work and work-life balance | 0.6 | 0.43 | 0.5 | 35 |
| (404) Civil and voluntary work | 0.88 | 0.86 | 0.87 | 50 |
| (405) Unemployment and job search | 0 | 0 | 0 | 14 |
| (501) Educational structure and organizations | 0.7 | 0.6 | 0.65 | 50 |
| (502) Educational attainment and history | 0.76 | 0.9 | 0.83 | 50 |
| (503) Educational activities | 0.81 | 0.84 | 0.82 | 50 |
| (504) Educational needs and support | 0.86 | 0.72 | 0.78 | 50 |
| (601) Partnership status and history | 0.88 | 0.86 | 0.87 | 50 |
| (602) Sexual orientation and behaviour | 0.86 | 0.78 | 0.82 | 23 |
| (603) Family relations and parenting | 0.78 | 0.56 | 0.65 | 50 |
| (604) Friendship and social ties | 0.84 | 0.84 | 0.84 | 50 |
| (605) Conflicts and cooperation | 0.82 | 0.84 | 0.83 | 50 |
| (606) Violence and abuse | 0.86 | 0.98 | 0.92 | 50 |
| (607) Household composition | 0.71 | 0.78 | 0.74 | 50 |
| (701) Ethnic and cultural identity | 0.84 | 0.86 | 0.85 | 50 |
| (702) Religious identity | 0.82 | 0.92 | 0.87 | 50 |
| (703) Political views and participation | 0.8 | 0.74 | 0.77 | 50 |
| (704) Macro-level issues and processes | 0.69 | 0.66 | 0.67 | 50 |
| (705) Gender | 0.95 | 0.95 | 0.95 | 20 |
| (706) Age, age groups and aging | 0.76 | 0.94 | 0.84 | 17 |
| (707) Human qualities and personality traits | 1 | 1 | 1 | 21 |
| (801) Sports and physical activities | 0.94 | 0.98 | 0.96 | 50 |
| (802) Culture and media consumption and activities | 0.84 | 0.94 | 0.89 | 50 |
| (803) Leisure activities and hobbies | 0.93 | 0.84 | 0.88 | 45 |
| (901) Wages and salaries | 0.77 | 0.89 | 0.83 | 46 |
| (902) Benefits and allowances | 0.62 | 0.64 | 0.63 | 50 |
| (903) Financial situation | 0.8 | 0.78 | 0.79 | 50 |
| (904) Private transfers | 0.81 | 0.9 | 0.85 | 42 |
| (905) Personal and household expenses | 0.79 | 0.88 | 0.83 | 50 |
| (1001) Crime events and criminal behavior | 0.93 | 0.82 | 0.87 | 50 |
| (1002) Legal system and sanctions | 0.85 | 0.92 | 0.88 | 50 |
| (1100) ADMINISTRATIVE | 0.82 | 0.62 | 0.7 | 50 |
| (1200) OTHER | 0.85 | 0.7 | 0.77 | 50 |
Inference platform
This model is used by the CAP Babel Machine, an open-source and free natural language processing tool, designed to simplify and speed up projects for comparative research.
Cooperation
Model performance can be significantly improved by extending our training sets. We appreciate every submission of CAP-coded corpora (of any domain and language) at poltextlab{at}poltextlab{dot}com or by using the CAP Babel Machine.
Debugging and issues
This architecture uses the sentencepiece tokenizer. In order to run the model before transformers==4.27 you need to install it manually.