Skip to content

Scraping and Analyzing Amazon reviews from Dpreview.com

Notifications You must be signed in to change notification settings

fongfan999/dpreview_analyzer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Welcome to Dpreview Analyzer

This tool will get and filter Amazon reviews about Camera that are rated 3-stars or above. Then, using SentiWordNet to reject and sort.

Installation

  • git clone https://github.com/fongfan999/dpreview_analyzer
  • cd dpreview_analyzer
  • bundle install

Usage

# From https://www.dpreview.com/products/cameras/all?view=list
available_years = [
  "2017", "2016", "2015", "2014", "2013", "2012", "2011", "2010", "2009",
  "2008", "2007", "2006", "2005", "2004", "2003", "2002", "2001", "2000",
  "1999", "1998", "1997", "1996", "1995", "1994", "Unknown year"
]
year = available_years.sample

# Example
  scraper = Dpreview::Scraper.new(year)
  scraper.scrape_amazon_reviews
  scraper.save

## --------------------------------------------------------------------------
# After we've got data, we can analyze by using SentiWordNet and sort them

# Load the default sentiment dictionaries
Dpreview::Analyzer.load_senti_dics

# Example
analyzer = Dpreview::Analyzer.new(year)
analyzer.sort(objectivity: 0.25, by: 'asc')
analyzer.save

About

Scraping and Analyzing Amazon reviews from Dpreview.com

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages