r/dailyprogrammer • u/mattryan • Mar 07 '12
[3/7/2012] Challenge #19 [difficult]
Challenge #19 will use The Adventures of Sherlock Holmes from Project Gutenberg.
Write a program that will build and output a word index for The Adventures of Sherlock Holmes. Assume one page contains 40 lines of text as formatted from Project Gutenberg's site. There are common words like "the", "a", "it" that will probably appear on almost every page, so do not display words that occur more than 100 times.
Example Output: the word "abhorrent" appears once on page 1, and the word "medical" appears on multiple pages, so the output for this word would look like:
abhorrent: 1
medical: 34, 97, 98, 130, 160
Exclude the Project Gutenberg header and footer, book title, story titles, and chapters.
View all comments
Show parent comment
1
u/luxgladius 0 0 Mar 08 '12 edited Mar 08 '12
Pastebin link to the output
Index: http://pastebin.com/6m2CqDx2
Also, added the following lines to the file to produce the paged output for comparison:
Too big for pastebin though.
Link: http://dl.dropbox.com/u/26082907/pages.txt