Issue: missing utterances

#1
by DrMatters - opened

This dataset has some utterances missing from the original data.

Example:
This is the list of utterances of dialogue with conv_id == hit:194_conv:388 from the hf hub dataset:
image.png
This is the list of utterances of the same dialogue in the original dataset (https://dl.fbaipublicfiles.com/parlai/empatheticdialogues/empatheticdialogues.tar.gz):
image.png
This is probably because of incorrect csv reading in your case. Pandas fail to read cells with an odd number of double quotas ". This can be handled by disabling quoting: pd.read_csv(..., quoting=3)
You can see the quotas that caused this error in the first utterance:
"I am so proud about myself. I just got promot...
this utterance has no closing quotas.

I'll try to work on it

interesting finding! @lhoestq do you remember who contributed that loader on GitHub?

Thanks for reporting, @DrMatters .

This bug should be fixed. Feel free to open a PR here on the Hub.

Please note the script is not using pandas, but csv from Python Standard Library. Therefore, instead of passing quoting=3, it needs to be passed quotechar=csv.QUOTE_NONE.

I'm just wondering if there are commas (,) within any of the CSV field contents, because with csv.QUOTE_NONE this could raise a parsing exception unless they use a escapechar. To be tested.

@julien-c , this script was bulk added (with many others) in this PR: https://github.com/huggingface/datasets/pull/63

@albertvillanova
I think all commas are replaced with "_comma_" in the dataset.

Sign up or log in to comment