Including Dialects and Language Varieties in Author Profiling

Alina Maria Ciobanu, Marcos Zampieri, Shervin Malmasi, Liviu P. DinuarXiv 2017 · arXiv

TL;DR

This paper presents a machine learning approach for author profiling on Twitter, focusing on the joint prediction of an author's gender and their specific language variety or dialect. By deploying an ensemble of linear Support Vector Machines (SVMs) trained on character and word $n$-grams, the system achieved a high accuracy of nearly 98% in distinguishing between Portuguese varieties, alongside stable performance across Arabic, English, and Spanish.

What Problem Does This Paper Address?

Author profiling aims to determine demographic characteristics (like age, gender, or native language) from text. While gender and age prediction are well-studied, identifying regional dialects and language varieties on social media introduces a fresh layer of complexity.

Tweets are short, informal, and filled with non-standard language. Discriminating between closely related varieties—such as Canadian vs. Australian English, or Egyptian vs. Levantine Arabic—requires capturing subtle lexical and syntactic nuances. The authors tackle this joint challenge (gender + dialect identification) as part of the PAN 2017 shared task.

Methods

The authors employ a single-label, multi-class classification strategy utilizing SVM ensembles. Instead of relying on a single complex model, their architecture combines the strengths of eight distinct linear SVM classifiers.

The individual classifiers differ by their feature focus:

  • Character $n$-grams: Six classifiers trained on character lengths from $n=1$ to $n=6$.
  • Word $n$-grams: Two classifiers trained on word unigrams ($n=1$) and bigrams ($n=2$).

To combine these models, the system uses a probability-based fusion method. It sums the predicted class probabilities from all eight classifiers, selecting the class with the highest cumulative probability. Hyperparameter tuning ($C$ value optimization) was performed via 3-fold cross-validation using Scikit-learn.

Datasets

The system was trained and evaluated on the official PAN 2017 author profiling dataset, which contains approximately 1,140,000 Twitter posts. The dataset spans four major pluricentric languages and their respective regional variants:

  • Arabic: Egypt, Gulf, Levantine, Maghrebi
  • English: Australia, Canada, Great Britain, Ireland, New Zealand, United States
  • Portuguese: Brazil, Portugal
  • Spanish: Argentina, Chile, Colombia, Mexico, Peru, Spain, Venezuela

Key Insights and Ideas

  • Language Complexity Dictates Feature Choice: For English, Spanish, and Portuguese, word unigrams provided the highest joint accuracy. However, for Arabic, character 4-grams performed best. This highlights how morphologically rich languages benefit more from sub-word features that capture roots and affixes rather than full words.
  • The Power of Ensembles: The ensemble approach consistently outperformed individual classifiers. For instance, the ensemble boosted English joint prediction accuracy by up to 8% compared to single-feature models.
  • Fewer Varieties, Higher Accuracy: Portuguese classification achieved remarkably high scores. The authors note this is unsurprising because the dataset only contained two Portuguese varieties (Brazil and Portugal), making it a binary choice compared to the 6-7 choices required for English and Spanish.

Key Results

During internal cross-validation, the system performed exceptionally well on Portuguese, hitting a language variety accuracy of 97%. English yielded the highest gender identification accuracy at 79%.

Table 1. Cross-validation accuracy on the training set for gender and language variety.

In the official PAN 2017 evaluation on the unseen test set, the system ranked 11th out of 22 teams for language variety identification, with an average accuracy of 85.24%. It comfortably outperformed the provided Bag-of-Words (BOW) and statistical baselines.

Table 2. Test set accuracy results for language variety identification.

For gender identification on the test set, the system ranked 12th out of 22 teams, achieving an average accuracy of 75.04%.

Table 3. Test set accuracy results for gender identification per language.

Limitations and Future Work

While the system proved robust, the authors expected a higher placement in the final standings. They identified three main limitations:

  1. Short Text Constraints: Twitter's character limits restrict the amount of contextual linguistic data available per user.
  2. Scale and Deep Learning: The massive size of the dataset (~1.14M posts) likely allowed competing teams to successfully leverage data-hungry deep learning architectures, which outpaced traditional SVMs.
  3. Sub-optimal Classifier Tuning: The implementation details of the individual classifiers may still have room for optimization.

For future work, the team plans to conduct a thorough error analysis of misclassified instances and explore the use of a meta-classifier stacking approach, which has previously shown strong results in German dialect identification.

Summary updated

Abstract

This paper presents a computational approach to author profiling taking gender and language variety into account. We apply an ensemble system with the output of multiple linear SVM classifiers trained on character and word $n$-grams. We evaluate the system using the dataset provided by the organizers of the 2017 PAN lab on author profiling. Our approach achieved 75% average accuracy on gender identification on tweets written in four languages and 97% accuracy on language variety identification for Portuguese.
BibTeX
@misc{ciobanu2017including,
  author = {Alina Maria Ciobanu and Marcos Zampieri and Shervin Malmasi and Liviu P. Dinu},
  title = {{Including Dialects and Language Varieties in Author Profiling}},
  year = {2017},
  eprint = {1707.00621},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1707.00621},
}

Loading related content...

Figure