Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EFunkhouser MP3 code and report #56

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

efunkhouser
Copy link

Not entirely certain the report will go through right as I pushed it from outside my virtual machine, but...fingers crossed?

Review on Reviewable

Sentiment analysis on 1850s novels, yay! EFunkhouser 2/27/2016
…ed (8 Gutenberg books) to do the project. EFunkhouser 2/27/16
…files for analysis by removing the junk Gutenberg puts at the beginning and end. EFunkhouser 2/27/16
…un sentiment analysis on successive chunks of it, filter the data, and output the data structures needed to plot the storyline for that book. EFunkhouser 2/27/16
…sults section: it calls analysis for each of the 8 books and then plots them all together in a Plotly ipython notebook. EFunkhouser 2/27/16
@srli
Copy link

srli commented Mar 20, 2016

Review status: 0 of 5 files reviewed at latest revision, 10 unresolved discussions.


a discussion (no related file):
A readme briefly listing the steps required to run the project would be super helpful in a situation where your code is spread over multiple files. I've made a couple of comments on possible improvements, please take a look!

All in all, nicely done! The rolling average thing was pretty cool, and reading your writeup was really fun.


get_booktext.py, line 14 [r1] (raw file):
if exists(file_name):

Will also work


get_booktext.py, line 23 [r1] (raw file):
If both parts of the if statement return None, you can just stick it outside the conditional :P


one_book_sentiment.py, line 76 [r1] (raw file):
book_file_name.split(".")[0] is a safer way to do this. (Just in case you get something weird like "Clotelle.txts")


plot_all_books.py, line 5 [r1] (raw file):
Ah, for final turn ins, try to make sure your code can run without any modifications. When I tried to run this, it gave me errors until I uncommented all of these lines.


plot_all_books.py, line 48 [r1] (raw file):
I can't run this because I don't have plotly credentials, but since your report shows really pretty graphs I'll assume that this code works.


trim_booktext.py, line 1 [r1] (raw file):
Little nitpicky thing, you import pickle but never use it. Try to keep imports clean.


trim_booktext.py, line 19 [r1] (raw file):
Hmm, it's good that you're doing error checking here. But returning none will cause your code to error out later.


trim_booktext.py, line 48 [r1] (raw file):
If you pass in None to remove_junk_end, None.lower() will break. You can solve this by adding an if statement that will skip the rest of the function if None is returned from remove_junk_beginning()


trim_booktext.py, line 52 [r1] (raw file):
You also can't write None to a file using f.write()


Comments from the review on Reviewable.io

@srli
Copy link

srli commented Mar 20, 2016

Reviewed 5 of 5 files at r1.
Review status: all files reviewed at latest revision, 10 unresolved discussions.


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