Comment Analysis / Machine Learning
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Reader comment analysis using the New York Times (c) community API


  • Requires python 2.7, numpy, matplotlib, scikit-learn and xmltodict
  • Rename config.example to and edit in your API keys
  • Load from apiQuery import TimesComments, then TimesComments('20140105',False) to query the NYT API for comments from January 5th, 2014 (or choose another date)
  • Load from classifyData import *, then classifyData('20140105') to begin classifying comments and training the learning model
  • With learning model trained, from commentAnalysis import CommentAnalysis, then CommentAnalysis('20140105') to find poems and calculate word frequencies


Use to load new comments from the NYT API

Use to train the learning algorithm

Use to perform analysis on comments

More Information

There is a blog post with more details about the ideas behind this project