Datasets:

Size:
n>1T
ArXiv:
License:

string codec and escaping

#2
by maxidl - opened

When I load the text, it appears there is some issue with unicode escaping to be aware of.
For example:

import datasets as hfds
d = hfds.load_dataset("allenai/madlad-400", streaming=True, languages=["en"], split="clean")
for x in d:
    break
print(x) # {'text': "Alisha // Twenty two // California\\nThis is my personal blog where I post whatever. I can't follow back on this sideblog, sorry.\\nI run ....

The issue is with the newline character being \\n and not \n. Not sure if it is a big deal, but I think people should be aware of this.

It is the same for \\t, maybe others as well? This would really be useful to have documented.

Ben, I could use some help on a big build, any interest?

Sign up or log in to comment