WEKA-Based: Key Features and Classifier for French of Five Countries

Zeqian Li, Keyu Qiu, Chenxu Jiao, Wen Zhu, Haoran TangarXiv 2022 · DOI

Abstract

This study explores the automated classification of regional French dialects from France, Belgium, Switzerland, Canada, and Monaco. Using the WEKA machine learning toolkit, we evaluate various classifiers and feature extraction techniques on a custom corpus derived from the Sketch Engine. Our findings identify Sequential Minimal Optimization (SMO) and character-level trigrams as the most effective components for identifying regional markers. While the models demonstrate high accuracy on training data, the subtle nature of dialectal differences in common topics presents significant challenges for generalization, resulting in a peak test accuracy of 39.35% on a specialized test set.

Introduction

French is a pluricentric language with distinct regional variations. Dialects such as those in Quebec, Wallonia, and the Swiss Romandy possess unique lexical, phonetic, and stylistic markers. For Natural Language Processing (NLP) systems to achieve high levels of naturalness and cultural competence, they must be capable of recognizing these subtle variations. This research addresses the problem of "blind modeling" in dialect recognition, seeking to identify the most effective machine learning algorithms and features for distinguishing between five major French-speaking regions.

Methodology

The researchers constructed a custom corpus using the Sketch Engine, focusing on four "popular life" themes: eating, drinking, sleeping, and living. The dataset comprised approximately 10,052 instances, with labels for Monaco (MC), Belgium (BE), France (FR), Canada (CA), and Switzerland (CH).

The data pipeline involved:

  1. Preprocessing: A custom Python script cleaned raw text, removing HTML tags and repetitions.
  2. Feature Extraction: Using WEKA’s StringToWordVector filter, the study compared standard Word Tokenization against Character N-Grams (unigrams, bigrams, and trigrams).
  3. Classification: Seven algorithms were tested, including NaiveBayes, SMO (Support Vector Machines), J48 (Decision Trees), and various rule-based and tree-based learners.

Results and Discussion

Classifier Performance

Among the algorithms tested, the SMO classifier consistently emerged as the top performer. As shown in the comparison of classifiers, SMO maintained superior accuracy across training set evaluation, 10-fold cross-validation, and percentage split methods compared to baseline models like ZeroR or probabilistic models like NaiveBayes.

Performance comparison of various machine learning classifiers across different evaluation methods.

Feature Engineering and the Power of Trigrams

A critical insight from the study was the impact of feature selection. While word-based tokenization is standard, character-level features proved more adept at capturing regional "flavors." Specifically, Character Trigrams allowed the SMO model to reach a peak training accuracy of 94.19%. This suggests that sub-word patterns and specific character sequences are more indicative of regional dialects than whole-word lexical choices in common daily topics.

Impact of different feature extraction techniques on classification accuracy.

Generalization Challenges

Despite the high performance during training, the models faced a significant "generalization gap." On a separate test set of 1,350 instances, the system achieved a peak accuracy of 39.35%. While this is nearly double the random-guess baseline (20%), it underscores the difficulty of the task. The researchers attribute this to the "low distinction of text" in the corpus; common topics like eating and sleeping are discussed in very similar ways across the five countries, often masking subtle regional markers.

Conclusion

This research demonstrates that while SMO and character trigrams are powerful tools for dialect classification, the choice of corpus is paramount. Future work should focus on refining data selection to include more "dialect-heavy" content and exploring complex linguistic features beyond simple N-grams to better capture the syntactic nuances of regional French.

Summary updated

BibTeX
@misc{li2022weka,
  author = {Zeqian Li and Keyu Qiu and Chenxu Jiao and Wen Zhu and Haoran Tang},
  title = {{WEKA-Based: Key Features and Classifier for French of Five Countries}},
  year = {2022},
  eprint = {2212.08132},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2212.08132},
}
Figure