fix_encoding
Hi, I would love to use this dataset, but unfortunately it is not JSON compatible in a few regards, so this aims to fix that!
First, it has trailing commas on the last sentences of each of "train" and "test", along with no comma after the "train" dict is over. This results in JSON parsers not being able to parse it at all.
Second, after correcting these errors, it still violates the JSON key uniqueness property. As everything in "test" or "train" are simply a Key:Value map, with all of them having the same Key, "text", they get merged and the last one gets picked.
This PR aims to fix these issues, by re-forming the JSON. Morally, the content is the same, but we now have a (correctly formatted) JSON document, with "train" and "test", but this time, each of those correspond to an array of strings, so there is no key collision. I hope this helps!
hi gil,
thanks for your pr. i indeed forgot a kind of "sanity check" when exporting the data into json. sorry for that. i will publish and merge the pr immediately!