Text Classification
Transformers
PyTorch
TensorFlow
Safetensors
xlm-roberta
Generated from Trainer
text-embeddings-inference
Instructions to use papluca/xlm-roberta-base-language-detection with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use papluca/xlm-roberta-base-language-detection with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="papluca/xlm-roberta-base-language-detection")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("papluca/xlm-roberta-base-language-detection") model = AutoModelForSequenceClassification.from_pretrained("papluca/xlm-roberta-base-language-detection", device_map="auto") - Inference
- Notebooks
- Google Colab
- Kaggle
Poor results with informal English greetings
#10
by ymurenko - opened
I did a test of common English greetings that are used on the internet, and the results are pretty poor:
hi -> ur, 0.71
HI -> ur, 0.70
Hi -> sw, 0.37
Hi! -> sw, 0.50
hey -> sw, 0.33
HEY -> hi, 0.71
Hey -> sw, 0.93
Hey! -> sw, 0.92
hello -> sw, 0.32
HELLO -> hi, 0.95
Hello -> en, 0.71
Hello! -> en, 0.53
yo -> sw, 0.96
YO -> hi, 0.86
Yo -> sw, 0.74
Yo! -> sw, 0.73
sup -> sw, 0.82
SUP -> sw, 0.55
Sup -> sw, 0.43
Sup! -> sw, 0.35
"Hey!" and "HELLO" have a very high confidence for the wrong language, and a lot of these get interpreted as Swahili (based on a quick google search, it doesn't look like any of these are actual words in that language)
the training set constists of complete sentences. this model might expectingly perform poor on a single word, yet a greeting like 'hi' which is used in many languages.
It is poor also for informal language or language that contains spelling mistakes