Skip to content

Natural language processing tutorial for text classification

Notifications You must be signed in to change notification settings

ashleylizg/nlp-tutorial

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

nlp-tutorial

Divide and prepare Amazon product reviews for food items for Natural Language Toolkit (NLTK) to train a classifier for sentiment analysis to determine positive and negative reviews.

Data Source: Grocery and Gourmet Food section of Amazon Review Data (2018) from Jianmo Ni, UCSD

Due to the size of this file, it must be downloaded and unzipped per use and is not included in this repository. The data folder is empty but can be used for this locally.

Running locally

git clone <this_repo>
cd nlp-tutorial

# (optional) Set up a virtual environment at /env
python -m venv env
# Then this should activate it in Powershell or a Unix terminal
./env/scripts/activate

# Install the requirements
pip install -r requirements.txt

# Run the Jupyter Notebook and select the main.ipynb file
jupyter notebook

# When finished, use Ctrl+C to kill the Jupyter Notebook, then exit the virtual environment
deactivate

For future runs:

cd nlp-tutorial
./env/scripts/activate
jupyter notebook
# When finished, use Ctrl+C to kill the Jupyter Notebook, then exit the virtual environment
deactivate

About

Natural language processing tutorial for text classification

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published