xlmr_formality_classifier

Maintained By
s-nlp

xlmr_formality_classifier

PropertyValue
Authors-nlp
ArchitectureXLM-RoBERTa
LicenseOpenRAIL++
PaperDetecting Text Formality: A Study of Text Classification Approaches (RANLP 2023)

What is xlmr_formality_classifier?

The xlmr_formality_classifier is a sophisticated multilingual model designed to classify text formality across multiple languages. Built on the XLM-RoBERTa architecture, it can effectively distinguish between formal and informal text in English, French, Italian, and Portuguese. The model achieves impressive overall accuracy of 79.4%, with particularly strong performance in English (85.2% accuracy).

Implementation Details

The model leverages the XLM-RoBERTa architecture and was trained on the XFORMAL dataset. It implements a binary classification approach, categorizing text as either formal (0) or informal (1). The implementation uses the Transformers library and can be easily integrated into existing NLP pipelines.

  • Achieves 87.4% macro-average precision for English
  • Supports cross-lingual formality detection
  • Provides probability scores for both formal and informal classifications
  • Optimized for real-time inference

Core Capabilities

  • Multilingual formality classification across four languages
  • High precision formal text detection (74.5% overall)
  • Robust informal text classification (88.9% precision)
  • Real-time text formality assessment
  • Probability-based classification outputs

Frequently Asked Questions

Q: What makes this model unique?

This model stands out for its multilingual capabilities and robust performance across different languages. It's one of the first comprehensive studies focusing specifically on formality detection, offering practical applications in content analysis and style transfer tasks.

Q: What are the recommended use cases?

The model is ideal for content moderation, automated writing assistance, style analysis in professional communications, and academic research. It can be particularly useful in applications requiring automatic assessment of text formality in multiple languages.

🍰 Interesting in building your own agents?
PromptLayer provides Huggingface integration tools to manage and monitor prompts with your whole team. Get started here.