@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ch선
웹 사이트의 일부 문제로 인해 발톱이 어려울 수 있습니다. 또한 자신의 위험에 따라 공개적으로 사용 가능한 파일을 사용하는 것과 같은 다른 옵션을 고려하십시오.
예를 들어,
그리고 Jack Bandy와 Nicholas Vincent의 논문은 또한 "Bookcorpus"와 그 복제물에 몇 가지 결함이 포함되는지 이해하는 데 가치가 있습니다.
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ch선
이들은 직접 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 ) 디렉토리에 저장됩니다.
연결된 텍스트를 문장 당 형식으로 만듭니다.
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 . 그러나 실패의 수는 성공 중 하나보다 훨씬 낮을 것입니다. 괜찮아요. 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}
}
Ryan Kiros, Yukun Zhu, Ruslan Salakhutdinov, Richard S. Zemel, Antonio Torralba, Raquel Urtasun 및 Sanja Fidler. "건너 뛰기 벡터." 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}
}