Homemade BookCorpus
收藏数据集概述
数据集名称: Homemade BookCorpus
数据来源: 原始数据来自smashwords.com,通过爬虫技术收集。
数据集特点:
- 数据集主要用于无监督学习中的句子编码/解码任务。
- 收集的句子可能与原始BookCorpus有部分差异,但数量大致相同。
- 使用新数据集时,需明确指出其为复制品。
数据集使用方法
- 准备URL列表: 使用提供的
url_list.jsonl文件,该文件包含于2019年1月19-20日收集的书籍URL。 - 下载文件: 使用
download_files.py脚本下载书籍文件,优先下载txt格式,其次尝试从epub格式提取文本。 - 后处理: 使用
make_sentlines.py脚本将下载的文本转换为每行一个句子的格式。可选地,使用tokenize_sentlines.py脚本结合Microsoft的BlingFire进行句子分词。
注意事项
- 使用此代码需遵守smashwords.com的条款,并注意版权和相关法律。
- 预期会有一些错误,如文件下载失败等,但成功率应远高于失败率。
技术要求
- 编程语言: Python3
- 依赖库: beautifulsoup4, progressbar2, blingfire, html2text, lxml
引用信息
若使用此代码,请引用:
@misc{soskkobayashi2018bookcorpus, author = {Sosuke Kobayashi}, title = {Homemade BookCorpus}, howpublished = {url{https://github.com/soskek/bookcorpus}}, year = {2018} }
同时,引用原始BookCorpus的相关论文:
@InProceedings{Zhu_2015_ICCV, title = {Aligning Books and Movies: Towards Story-Like Visual Explanations by Watching Movies and Reading Books}, author = {Zhu, Yukun and Kiros, Ryan and Zemel, Rich and Salakhutdinov, Ruslan and Urtasun, Raquel and Torralba, Antonio and Fidler, Sanja}, booktitle = {The IEEE International Conference on Computer Vision (ICCV)}, month = {December}, year = {2015} }
@article{kiros2015skip, title={Skip-Thought Vectors}, author={Kiros, Ryan and Zhu, Yukun and Salakhutdinov, Ruslan and Zemel, Richard S and Torralba, Antonio and Urtasun, Raquel and Fidler, Sanja}, journal={arXiv preprint arXiv:1506.06726}, year={2015} }




