Skip to content

haotiansun14/absa_poc_pipeline

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A GPT-3-based proof-of-concept Aspect-Based Sentiment Analysis pipeline

This is the code related to the article .

Note that this is a proof-of-concept and not a production-ready pipeline. It is not meant to be used in production by any means, but rather to demonstrate the potential of the approach.

Setup

Setup virtual environment

$ python3 -m venv .venv
$ source .venv/bin/activate

Install dependencies

$ pip install -r requirements.txt

Scraping

Using CLI

To run the Scrapy spider on a specific Amazon url, you can do:

$ scrapy runspider \
  absa/scraping/amazon.py \
  -O reviews.csv \
  -a start_url='https://www.amazon.com/FIODIO-Comfortable-Anti-Ghosting-Resistant-Multimedia/product-reviews/B086168Y25/ref=cm_cr_dp_d_show_all_btm?ie=UTF8&reviewerType=all_reviews'

It will automatically follow the next pages until the required number of items have been scraped.

Using the notebook

You can also play with the notebook notebooks/scraping.ipynb to see how the scraping works.

Analysis

The documented analysis pipeline is in notebooks/analysis.ipynb.

About

A GPT-3-based proof-of-concept Aspect-Based Sentiment Analysis pipeline

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 97.5%
  • Python 2.5%