dariusk / NaNoGenMo-2015

National Novel Generation Month, 2015 edition.
341 stars 21 forks source link

Library of Babel, Author of the Quixote #117

Open bcj opened 8 years ago

bcj commented 8 years ago

This is my NaNoGenMo warm up project. It is mentioned in #3. Given a text, it will find that text page-by-page within The Library of Babel and produce a page of links to those pages.

code here: https://github.com/bcj/menard examples:

Depending on whether we count the text on the linked pages, or just the link page itself as the generated novel, these examples may not meat the length requirement (War and Peace comes closer at 17,078 words). If this is the case, let me know and I'll find a longer text (or more likely collection of texts) which will unambiguously meet the requirements.

ikarth commented 8 years ago

The length requirement is open to personal interpretation, so I'd say if you feel it meets it, then it does. If not, then it doesn't.

The Complete Works of William Shakespeare is probably long enough to pass. You can race the infinite room of monkeys to see who finishes first.

MichaelPaulukonis commented 8 years ago

War and Peace comes closer at 17,078 words

What version of War and Peace are you reading? It's a HUGE novel! I don't have a text at hand, but wikipedia notes 2 translations, the shortest of which has 560,000 words. That's 11 NaNoGenMo novels, right there.

https://en.wikipedia.org/wiki/List_of_longest_novels

enkiv2 commented 8 years ago

If a link to library of babel constitutes a word, then that takes the place of... a lot of characters.

On Tue, Nov 3, 2015 at 8:44 AM Michael Paulukonis notifications@github.com wrote:

War and Peace comes closer at 17,078 words

What version of War and Peace are you reading? It's a HUGE novel! I don't have a text at hand, but wikipedia notes 2 translations, the shortest of which has 560,000 works. That's 11 NaNoGenMo novels, right there.

https://en.wikipedia.org/wiki/List_of_longest_novels

— Reply to this email directly or view it on GitHub https://github.com/dariusk/NaNoGenMo-2015/issues/117#issuecomment-153356192 .

bcj commented 8 years ago

Each link constitutes 16 words (I give the exact location in the library that the link is pointing to), but yeah.

Also: IMPORTANT I asked the creator of libraryofbabel.info about rate limiting (the API for the librarary is forthcoming, I've been reliant on scraping), and he said that for now, he prefers it if people stick to human means of querying. I haven't updated my code to reflect this yet, so in the mean time maybe don't run this.

enkiv2 commented 8 years ago

Doesn't the library of babel site use hashes of the complete text as the basis for indexing? Or, am I thinking of something else?

On Tue, Nov 3, 2015 at 9:15 AM Brendan Curran-Johnson < notifications@github.com> wrote:

Each link constitutes 16 words (I give the exact location in the library that the link is pointing to), but yeah.

Also: IMPORTANT I asked the creator of libraryofbabel.info about rate limiting (the API for the librarary is forthcoming, I've been reliant on scraping), and he said that for now, he prefers it if people stick to human means of querying. I haven't updated my code to reflect this yet, so in the mean time maybe don't run this.

— Reply to this email directly or view it on GitHub https://github.com/dariusk/NaNoGenMo-2015/issues/117#issuecomment-153368036 .

bcj commented 8 years ago

It does, but (to the best of my knowledge) the exact hashing method it uses hasn't been made public, so the only way to query is by way of the website.

ikarth commented 8 years ago

You could use the complete link URL as your word count; which will quickly push you to an insane number of characters.