@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@/
ウェブサイトの問題のために、爪は難しいかもしれません。また、あなた自身の責任で公開されているファイルを使用するなど、別のオプションを検討してください。
例えば、
そして、ジャック・バンディとニコラス・ヴィンセントによる論文は、「bookcorpus」とその複製にいくつかの欠陥がどのように含まれるかを理解するためにも価値があります。
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@/
これらは、自分でbookcorpusを再現するためのスクリプトです。
BookCorpusは、特に文のエンコーダ/デコーダーの監視されていない学習のために、人気のある大規模なテキストコーパスです。ただし、BookCorpusはもはや分布していません...
このリポジトリには、bookcorpusの元のソースであるsmashwords.comからのデータを収集するクローラーが含まれています。収集された文は部分的に異なる場合がありますが、それらの数は大きくなるか、ほぼ同じになります。作品で新しいコーパスを使用する場合は、レプリカであることを指定してください。
利用可能な本のURLを準備します。ただし、このリポジトリには、2019年1月19〜20日に収集されたスナップショットI(@soskek)であるurl_list.jsonlとしてすでにリストがあります。必要に応じて使用できます。
python -u download_list.py > url_list.jsonl &
ファイルをダウンロードします。可能であれば、 txtファイルのダウンロードは実行されます。それ以外の場合、これはepubからテキストを抽出しようとします。追加の引数--trash-bad-count単語数が公式の統計とは大きく異なるepubファイルをフィルタリングします(障害を暗示する可能性があるため)。
python download_files.py --list url_list.jsonl --out out_txts --trash-bad-count
結果は、 --out (ここではout_txts )のディレクトリに保存されます。
Sente-er-Line形式で連結テキストを作成します。
python make_sentlines.py out_txts > all.txt
MicrosoftのBlingfireによるセグメント化された単語にそれらをトークン化したい場合は、以下を実行してください。これには、自分で別の選択肢を使用できます。
python make_sentlines.py out_txts | python tokenize_sentlines.py > all.tokenized.txt
たとえば、smashwords.comの用語を参照できます。責任を持ってコードを使用し、それぞれの著作権と関連する法律を遵守してください。私は、このリポジトリの結果として上昇する盗作や法的意味について責任を負いません。
pip install -r requirements.txt
Failed: epub and txt 、 File is not a zip fileか、 Failed to open 。しかし、障害の数は成功の1つよりもはるかに少なくなります。心配しないで。 epub2txt.pyはhttps://github.com/kevinxiong/epub2txt/blob/master/epub2txt.pyから派生および変更されています
このコードが便利だと思ったら、URLで引用してください。
@misc{soskkobayashi2018bookcorpus,
author = {Sosuke Kobayashi},
title = {Homemade BookCorpus},
howpublished = {url{https://github.com/soskek/bookcorpus}},
year = {2018}
}
また、元のBookCorpusを作成した元の論文は次のとおりです。
Yukun Zhu、Ryan Kiros、Richard Zemel、Ruslan Salakhutdinov、Raquel Urtasun、Antonio Torralba、Sanja Fidler。 「本や映画の調整:映画を見て本を読むことによる物語のような視覚的説明に向けて。」 Arxiv Preprint arxiv:1506.06724、ICCV 2015。
@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}
}
@inproceedings{moviebook,
title = {Aligning Books and Movies: Towards Story-like Visual Explanations by Watching Movies and Reading Books},
author = {Yukun Zhu and Ryan Kiros and Richard Zemel and Ruslan Salakhutdinov and Raquel Urtasun and Antonio Torralba and Sanja Fidler},
booktitle = {arXiv preprint arXiv:1506.06724},
year = {2015}
}
ライアン・キロス、ユクン・Zhu、ルスラン・サラフヒトディノフ、リチャード・S・ゼメル、アントニオ・トラルバ、ラケル・ウルタスン、サンジャ・フィドラー。 「スキップ思考のベクトル。」 Arxiv Preprint Arxiv:1506.06726、NIPS 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}
}