[Paper Review] Language Detection For Short Text Messages In Social Media
This paper proposes a user-aware probabilistic language detection model for short social media texts, enhancing a modified Kneser-Ney n-gram language model with user-specific metadata such as UI language and historical language use. The method significantly outperforms CLD2 and langid, achieving state-of-the-art accuracy on multilingual Twitter data by leveraging user behavior patterns and smoothing techniques for rare n-grams.
With the constant growth of the World Wide Web and the number of documents in different languages accordingly, the need for reliable language detection tools has increased as well. Platforms such as Twitter with predominantly short texts are becoming important information resources, which additionally imposes the need for short texts language detection algorithms. In this paper, we show how incorporating personalized user-specific information into the language detection algorithm leads to an important improvement of detection results. To choose the best algorithm for language detection for short text messages, we investigate several machine learning approaches. These approaches include the use of the well-known classifiers such as SVM and logistic regression, a dictionary based approach, and a probabilistic model based on modified Kneser-Ney smoothing. Furthermore, the extension of the probabilistic model to include additional user-specific information such as evidence accumulation per user and user interface language is explored, with the goal of improving the classification performance. The proposed approaches are evaluated on randomly collected Twitter data containing Latin as well as non-Latin alphabet languages and the quality of the obtained results is compared, followed by the selection of the best performing algorithm. This algorithm is then evaluated against two already existing general language detection tools: Chromium Compact Language Detector 2 (CLD2) and langid, where our method significantly outperforms the results achieved by both of the mentioned methods. Additionally, a preview of benefits and possible applications of having a reliable language detection algorithm is given.
Motivation & Objective
- To address the challenge of reliable language detection in short, noisy social media texts such as Twitter posts.
- To improve classification accuracy by incorporating user-specific metadata, including UI language and past language usage.
- To evaluate and compare multiple language detection approaches—SVM, logistic regression, dictionary-based, and probabilistic models—on short text data.
- To benchmark the proposed method against established tools like CLD2 and langid, demonstrating superior performance.
- To explore the broader applicability of user metadata in multilingual content analysis across social media platforms.
Proposed method
- A probabilistic language model based on modified Kneser-Ney smoothing is used to estimate n-gram probabilities, enabling better handling of out-of-vocabulary n-grams in short texts.
- User-specific features such as the user interface (UI) language and the user's historically used languages are integrated into the model to refine predictions.
- Evidence accumulation per user is implemented to dynamically update language confidence based on past tweets, improving long-term accuracy.
- The model combines character n-grams (1–4) with language-specific smoothing to enhance robustness against spelling errors and abbreviations.
- SVM and logistic regression classifiers are trained on the same Twitter dataset to compare performance against the probabilistic model.
- A dictionary-based approach using Aspell dictionaries is implemented as a baseline, though it underperforms due to mismatch with informal language.
Experimental results
Research questions
- RQ1Can incorporating user-specific metadata such as UI language and historical language use improve language detection accuracy in short social media texts?
- RQ2How does a Kneser-Ney smoothed probabilistic model compare to traditional classifiers like SVM and logistic regression in short text language detection?
- RQ3To what extent does user behavior history (e.g., past languages used) enhance the performance of language detection models?
- RQ4How does the proposed method compare quantitatively to established tools like CLD2 and langid in terms of accuracy on short text data?
- RQ5What insights can be drawn from the correlation between predicted language, UI language, and tweet timing across different time zones?
Key findings
- The Kneser-Ney smoothed probabilistic model with user-specific metadata achieved the highest classification accuracy among all tested methods, significantly outperforming both SVM and logistic regression.
- The integration of user interface language and historical language use into the model led to a measurable improvement in detection accuracy, validating the hypothesis that user behavior patterns are informative.
- The dictionary-based method performed poorly due to mismatch with informal language, such as abbreviations, acronyms, and spelling errors common in short texts.
- The proposed model outperformed both CLD2 and langid in terms of accuracy, demonstrating its superiority for short text language detection.
- A strong correlation was observed between predicted language and UI language, with users tweeting in Spanish or Portuguese often having those languages set as UI, indicating linguistic and geographic alignment.
- Tweet timing analysis revealed that languages like English, Spanish, and Portuguese have even distribution across time zones, while Chinese tweets drop after 4 PM UTC, aligning with China’s local time.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.