pr/1_bucc_import

#1
by muibk - opened
No description provided.

The bucc18.de subset contains some empty strings in either the source or target sentences. For instance, the entry at index 791 contains an empty source sentence, as shown in the example below:

from datasets import load_dataset
bucc_de = load_dataset("xtreme", "bucc18.de", split="test")
bucc_de[791]

# gives the following output:
# {'source_sentence': '', 'target_sentence': 'A joint agreement on the automatic exchange of information on financial accounts was signed on Wednesday.', 'source_lang': 'de-000066789', 'target_lang': 'en-000172872'}

However, the original BUCC training data does contain the respective source sentence. The reason for the missing source/target sentences is that when reading source/target sentences, the CSV reader fails to correctly parse the line when there are non-matching quotation marks, e.g. in line 13166 of the original de-en.training.de file:

de-000013166	"Eine Zusammenfassung aller Kirchen findet sich unter Liste der Kirchengebäude in Leipzig.

A quick fix is to add the quotechar = None argument in lines 700 and 702 of xtreme.py. In this way, all source-target pairs that are actually in the original BUCC18 data can be retrieved. Without this fix, there are 167 sentence pairs that contain either empty source or target strings.

muibk changed pull request status to open

Thanks for the fix ! This dataset was created on GitHub, so I created a GitHub PR with your change: https://github.com/huggingface/datasets/pull/4706 (once the GitHub PR is merged, the commit will appear here on huggingface.co with you s co-author and then we can close the current PR)

Alright it's merged :) thanks again @muibk !

lhoestq changed pull request status to closed

Sign up or log in to comment