Skip to content

Conversation

@abuchele
Copy link

Review on Reviewable

@rdiverdi
Copy link

Review status: 0 of 2 files reviewed at latest revision, 8 unresolved discussions.


textmining.py, line 1 [r1] (raw file):
You should put the import after the header comment


textmining.py, line 4 [r1] (raw file):
Nice job, It looks like you have a good understanding of everything you used. One thing to make sure of is that everything needed to run your code is on GitHub. I can't run your code because I don't have the .txt files needed. Also, you could have written a python script to download the books you used, (that way you wouldn't need to go through the effort of downloading them all yourself).
In general, you should think more about how you can split up your code into simpler functions: doing that makes the code more readable and makes it easier for you to test things incrementally.
There were also a few things you could have done more efficiently or with fewer lines of code, which I commented on below.


textmining.py, line 12 [r1] (raw file):
You can get the entire document as a string using document.read()


textmining.py, line 13 [r1] (raw file):
You could have made this shorter using string.punctuation, which is just a list of all punctuation


textmining.py, line 53 [r1] (raw file):
analyses.append(wordcounter(b1900)) would be more clear


textmining.py, line 92 [r1] (raw file):
You could have just done for eachbook in frequencies, then the next line would be unnecessary


textmining.py, line 126 [r1] (raw file):
This bit of code is repeated almost exactly a few times, you could probably have made this a function to cut down on the length of your file.


textmining.py, line 223 [r1] (raw file):
all imports should go at the top


Comments from the review on Reviewable.io

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants