AspectSense is a web-based aspect-based sentiment analysis tool that scrapes customer reviews from a Google Maps URL and displays the results on a client-side user interface.
The main goal of AspectSense is to provide a user-friendly interface to analyze customer reviews of a particular business or location. The tool extracts aspects, descriptors, and polarity of the customer reviews and presents them in an easily readable format. This information can be useful for businesses to understand customer opinions and make improvements to their offerings.
Image Credits: Springer
- git
- pip3
- node
Step 1:
Clone this repository
git clone <repository>
Step 2:
Change the work dir
cd <repository>
Step 1:
Navigate to the /server directory:
cd server
Step 2:
Install requirements
pip3 install -r requirements.txt
Step 3:
Add API key
- Generate OpenAI api key from OpenAI
- Create
.env
file in the server directory - Add api key in the below format
OPENAI_API_KEY=<your_api_key>
OPENAI_MODEL_ENGINE=<your_model_engine>
Step 4:
Run the server in debug mode
uvicorn app:app --debug
- The server should be available at http://localhost:8000.
Step 1:
Navigate to the /client directory:
cd client
Step 2:
install the dependencies:
npm install
Step 3:
Start the React client by navigating to the /client directory and running
npm start
- The client should be available at http://localhost:3000.
- Navigate to the root directory of the project and build the Docker images:
docker-compose build
- Start the containers:
docker-compose up
The React client should be available at http://localhost:3000 and the FastAPI server should be available at http://localhost:8000.
To use AspectSense, enter a Google Maps URL in the input field and click the "Submit" button. The tool will scrape customer reviews from the URL and display the results in a table format. The table includes columns for the customer reviews, ratings, segmented reviews, aspects with descriptions, and aspects with polarity.
Note: The tool is intended for educational and demonstration purposes only. The scraping of customer reviews from Google Maps may be against Google's terms of service, so use this tool at your own risk.