Team Ai
Modelpublic

software-si/change-language-intent

sourceHugging Faceapache-2.0updated 11mo agoView on Hugging Face
0likes14downloads
Model Card

๐ŸŒ Multilingual Intent Classifier โ€“ Language Switching

This model is a fine-tuned multilingual BERT (bert-base-multilingual-cased) for intent classification of language-switching requests. It recognizes when a user wants to change the conversation language and supports 5 language:

  • โ€”english
  • โ€”italian
  • โ€”german
  • โ€”spanish
  • โ€”french

It recognizes even other class of text like:

  • โ€”other (generic sentences not related to language switching)
  • โ€”not_allowed (unsupported languages)

๐Ÿ“Š Training Data

  • โ€”~6,000 training examples
  • โ€”Short conversational sentences (e.g. "Can we switch to English?", "Vorrei parlare in italiano", "Nein, bitte auf Deutsch"), and pieaces of conversation steps
  • โ€”Languages covered: English, Italian, German, Spanish, French
  • โ€”not_allowed and other provide robustness for real-world inputs ---

๐Ÿš€ Usage with ๐Ÿค— Transformers

You can use the model directly with the pipeline API:

python
from transformers import pipeline

# Replace with the actual model repo
model_name = "software-si/change-language-intent"

classifier = pipeline(
    task="text-classification",
    model=model_name,
    tokenizer=model_name,
    return_all_scores=True
)

texts = [
    "Vorrei parlare in italiano",
    "Can we switch to English?",
    "Nein, bitte auf Deutsch"
]

results = classifier(texts)

for text, res in zip(texts, results):
    print(f"\nInput: {text}")
    for r in res:
        print(f"  {r['label']}: {r['score']:.4f}")