Skip to content

What is in the MaCocu parallel corpora?

mespla edited this page Oct 25, 2022 · 18 revisions

A comparison of MaCoCu parallel datasets based on genre, English variants and other metadata

MaCoCu parallel corpora contain rich metadata on the properties of texts. As part of the MaCoCu corpora evaluation, we analyse metadata such as English language variety, translation direction or average text length, etc. We also apply genre identification to the datasets to explore what kind of texts are included in MaCoCu corpora and how the datasets differ from each other.

From sentences to documents (texts)

Most of the metadata and analysis performed as part of this work have required going from the MaCoCu sentence-based TMX files into a dataset of texts by merging sentences that belong to the same document. Sizes are shown in the following table:

Dataset # sentences # texts # sentences per text
MaCoCu-sl-en 3M 286k avg 10,4
MaCoCu-mt-en 1M 47k avg 21,2
MaCoCu-is-en 0.35M 40k avg 6,4
MaCoCu-mk-en 0.47M 55k avg 8,6
MaCoCu-tr-en 10M 796k avg 12,5
MaCoCu-bg-en 3M 287k avg 10,4
MaCoCu-hr-en 3M 325k avg 9,2

Table 1: Sizes of parallel data in number of sentences and texts.

Genre identification

Genre prediction requires longer chunks of text than sentences, that is why the analysis was performed at document level. To assure a better reliability of the results, in a pre-processing step, we discarded some sentence pairs that are less likely to be correctly aligned because they come from different web domains, and texts that a) contain no full sentences or b) are very short (have less than 79 words in all).

Furthermore, after genre prediction, which was applied on the English side of the datasets, we post-processed the results by discarding unreliable labels (“Other”, “Forum”, and labels predicted with low confidence).

The sizes of datasets at each step are shown in Table 2.

Dataset Texts in original dataset Texts in pre-processed dataset Texts in post-processed dataset
MaCoCu-sl-en 286k 102k 91k
MaCoCu-mt-en 47k 24k 21k
MaCoCu-is-en 40k 13k 12k
MaCoCu-mk-en 55k 22k 20k
MaCoCu-tr-en 796k 213k 194k
MaCoCu-bg-en 287k 107k 86k
MaCoCu-hr-en 325k 102k 92k

Table 2: Comparison of sizes of datasets (original number of texts, texts after pre-processing, and texts with final genre labels).

Manual genre annotation analysis

We manually annotated 150 texts to analyze the performance of the genre classifier on the MaCoCu datasets. The results show that the classifier’s performance on the post-processed data is high, reaching 0.92 in terms of micro AVG F1 score and weighted AVG F1 score.

Precison Recall F1
Information/Explanation 0.90 0.96 0.93
Promotion 0.97 0.91 0.94
Opinion/Argumentation 0.91 0.77 0.83
News 1.00 0.92 0.96
Instruction 0.80 1.00 0.89
Legal 0.87 0.93 0.90
Prose/Lyrical 1.00 1.00 1.00
Accuracy 0.92
Macro AVG 0.92 0.93 0.92
Weighted AVG 0.93 0.92 0.92

Table 3: The performance of our genre classifier based on manual annotation of a sample of MaCoCu corpora.

Genre distribution

Genre distribution MaCoCu Corpora

Figure 1: The distribution of genres in MaCoCu parallel corpora.

The analysis of genre distribution revealed interesting differences between the datasets. As shown in Figure 1, the genre class Information/Explanation is notably present in all corpora, covering 20-30% of texts. Prose/Lyrical is the least present genre, followed by Opinion/Argumentation, which is especially infrequent in the Turkish-English corpus. While Legal mostly covers up to 6% of the datasets, it was revealed to be much more present in the Maltese-English dataset, where almost a third of all texts are classified as Legal.

Another interesting difference is related to the distribution of News and Promotion. The analysis showed that almost half of the Macedonian-English dataset consists of News texts. This category is also very frequent in Maltese-English and Icelandic-English corpora. In contrast, in Slovene-English, Croatian-English, Turkish-English and Bulgarian-English datasets, there is less News, but much more Promotion, covering around 30-40% of the datasets.

Language variety: British or American English?

When crawling, we do not distinguish at language variant level, so we end up having a mix of variants in MaCoCu parallel data. As useful metadata, we decided to distinguish, at least, the main English variants: British and American English. These were identified with the spelling- and vocabulary-based American-vs-British variety classifier. The classifier was run on the English side of the texts gathered from the bilingual corpus.

Results are presented in Figure 2. The analysis showed that the British variant is more commonly used than the American variant in Slovene-English, Icelandic-English, Maltese-English and Croatian-English corpora. British English is especially present in the Maltese-English corpus, where it was detected in more than 60% of texts. In contrast, the American variant is more present in the Turkish-English, Bulgarian-English and Macedonian-English corpora. In 28% to 35% of texts either no variant was detected or there were signals of both variants.

British or American English in MaCoCu Corpora

Figure 2: Distribution of British and American English in English texts in MaCoCu parallel corpora.

Translation direction: original or translation?

In a parallel corpus, there is usually one side that corresponds to the original text and another that corresponds to a translation from the original text (not always!, both could be translations!). Assuming this, we perform translation direction identification at document level (texts) in MaCoCu corpora.

The task was performed by fine-tuning XLM-Roberta-large based on sentence-level input. A gold standard was used: Europarl data for 20 languages, including Slovene and Bulgarian. For Slovene and Croatian, annotated MaCoCu data were produced. For evaluation, we had WMT data for Icelandic and Turkish.

Accuracy, in which the domain clearly played a crucial role, is presented in the following table:

Translation direction in MaCoCu Corpora

Table 4: Accuracy on translation direction prediction

This was then applied to all MaCoCu corpora to obtain metadata that we added to the corpus.

English as original in MaCoCu Corpora

Figure 3: Percentage of document pairs for which English was the source language in the MaCoCu parallel corpora

In most of the corpora, the texts were mostly originally written in the other language and translated into English. An exception to this is the Maltese-English MaCoCu-mt-en where almost 60% of texts were identified to be originally written in English.

Comparison of MaCoCu parallel corpora

We summarize the results on how corpora compare based on metadata from the corpus and genre distribution in the following table:

Metadata analysis in MaCoCu Corpora

Table 5: Comparison of MaCoCu parallel corpora based on rich metadata and genre prediction.

The results in Table 5 show:

  • The distribution of English variants - percentage of texts identified as British or American (see section "Language variety: British or American English?").
  • The translation direction (see section "Translation direction: original or translation?").
  • The average length of English texts: the median length of English texts ranges from 170 to 300 words. Maltese dataset stands out here as well with generally longer texts than the rest.
  • The diversity of sources: the number of web domains that cover more than 1% of texts and the percentage of texts that originate from these most frequent domains. We can see that most datasets have diverse sources, as the most frequent domains cover up to 38% of all texts. The datasets with the most diverse sources are Slovene-English MaCoCu-sl-en, Turkish-English MaCoCu-tr-en, Croatian-English MaCoCu-hr-en, and Bulgarian-English MaCoCu-bg-en. The dataset with the least diverse sources is the Maltese-English corpus, as 80% of its texts come from 13 most frequent websites. The most frequent web domain in this corpus is europarl.europa.eu, which is the source of 23% of all texts in the dataset.
  • Genre distribution in datasets (see section "Genre distribution").

More info and reproducibility

To perform a similar analysis or even work on other tasks, you can download MaCoCu corpora from the MaCoCu website.

More details on the analysis and genre classification, and the code, used for the experiments, are available here: https://github.com/TajaKuzman/Applying-GENRE-on-MaCoCu-bilingual

Code for language variety is also available here: American-vs-British variety classifier

After the release of the second round of MaCoCu corpora, the analysis will be extended to new languages, and we plan to publish the extended analysis as a paper.

Disclaimer

The contents of this document are the sole responsibility of the members of the MaCoCu consortium, and do not necessarily reflect the opinion of the European Union.