{"id":17761546,"url":"https://github.com/manulthanura/reviewclassifier","last_synced_at":"2025-04-15T14:13:42.222Z","repository":{"id":244381751,"uuid":"812998525","full_name":"manulthanura/ReviewClassifier","owner":"manulthanura","description":"ReviewClassifier is end-to-end machine learning project that can predict a input product review positive or negative.","archived":false,"fork":false,"pushed_at":"2025-04-14T13:22:26.000Z","size":1981,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-15T14:13:36.585Z","etag":null,"topics":["bootstrap5","classification","end-to-end","flask","logistic-regression","machine-learning","python","review","semantic-segmentation"],"latest_commit_sha":null,"homepage":"https://reviewclassifier.azurewebsites.net","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/manulthanura.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-10T10:06:12.000Z","updated_at":"2025-03-19T06:41:02.000Z","dependencies_parsed_at":"2024-11-08T03:27:43.117Z","dependency_job_id":"137867a0-c61d-44e5-ae4e-b5fe7d7eb13d","html_url":"https://github.com/manulthanura/ReviewClassifier","commit_stats":null,"previous_names":["manulthanura/reviewclassifier"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manulthanura%2FReviewClassifier","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manulthanura%2FReviewClassifier/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manulthanura%2FReviewClassifier/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manulthanura%2FReviewClassifier/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/manulthanura","download_url":"https://codeload.github.com/manulthanura/ReviewClassifier/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249085429,"owners_count":21210267,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bootstrap5","classification","end-to-end","flask","logistic-regression","machine-learning","python","review","semantic-segmentation"],"created_at":"2024-10-26T19:38:59.941Z","updated_at":"2025-04-15T14:13:42.203Z","avatar_url":"https://github.com/manulthanura.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ReviewClassifier\n\nReviewClassifier is a web application that classifies reviews into positive and negative categories. The application uses a machine learning model to classify the reviews. The model is trained using a dataset of reviews that are labeled as positive and negative. The model is then used to predict the sentiment of new reviews. The application is built using Flask, a Python web framework, and deployed on Azure, a cloud platform as a service. The application is designed to be simple and easy to use. Users can enter a review in a text box and click a button to classify the review. The application will then display the predicted sentiment of the review.\n\n\u003c!-- add img --\u003e\n![ReviewClassifier](./static/images/reviewclassifier.jpg)\n\n\n![Static Badge](https://img.shields.io/badge/Repo-ReviewClassifier-purple) ![GitHub](https://img.shields.io/github/license/manulthanura/ReviewClassifier) ![GitHub Repo stars](https://img.shields.io/github/stars/manulthanura/ReviewClassifier?color=yellow) ![GitHub last commit](https://img.shields.io/github/last-commit/manulthanura/ReviewClassifier)\n\n## Problem statement\n\nThe aim of this project is to build a end-to-end machine learning project that can predict a input product review positive or negative.\n\n## Installation\n\nCreate a virtual environment and install the required packages using the following command:\n\n- Create a virtual environment: `python -m venv env`\n- Activate the virtual environment: `source env/bin/activate`\n- Install the required packages: `pip install -r requirements.txt`\n\n## Download dataset\n\nView data - https://www.kaggle.com/datasets/dineshpiyasamara/sentiment-analysis-dataset\n\nCommand to download data:\n\n`dineshpiyasamara/sentiment-analysis-dataset` or `kaggle datasets download -d dineshpiyasamara/sentiment-analysis-dataset`\n\n## Data Preprocessing\n\nTo preprocess the data we can use several techniques like removing stopwords, punctuation, and lemmatization.\nin this project I use the following techniques:\n\n- Remove stopwords\n- Remove punctuation\n- Stemming\n- Remove special characters\n- Remove numbers\n- Remove links\n- Convert to lowercase\n\n## Vocabulary Building\n\nIn this step we will build a vocabulary from the dataset and vectorize the text data.\n\n## Model Building\n\nFor build the model first we need to check the data is balanced or not. If the data is not balanced we need to balance the data using `imbalanced-learn` library.\n\nSince this is a binary classification problem we can use several algorithms like:\n- Logistic Regression\n- Random Forest\n- Decision Tree\n- Support Vector Machine\n- Naive Bayes\n\n### Model Evaluation\n\nTo evaluate the model we can use several metrics like:\n- Accuracy\n- Precision\n- Recall\n- F1 Score\n\n### Model Deployment\n\nI use all the above algorithms and compare the accuracy of each model. To go ahead I choose logistic regression because it gives the best accuracy.\n\n### Prediction Pipeline\n\nAfter building the model we need to create a prediction pipeline that can predict the input review is positive or negative.\n\n## Build Website\n\nTo build a website we can use Flask or Django. In this project, I use Flask to build a website. Also, use bootstrap for the styling of the website.\n\n## Deployment\n\nBefore deploying project make sure to remove following libraries from requirements.txt file:\n`pywin32==306` and `pywinpty==2.0.13`\n\nGenerally, these libraries are used for windows and not required for deployment. Mos of the cloud platforms like Heroku, Azure, AWS, etc. are Linux based. For the deployment, I use Azure.\n\n## Usefull Commands\n\n- To install libraries: `pip install -r requirements.txt`\n- View installed libraries: `pip list`\n- Open jupyter notebook: `jupyter notebook` or `python -m notebook`\n- To create a requirements file: `pip freeze \u003e requirements.txt`\n- To run the flask app: `python app.py`\n- Check python version: `python --version`\n\n## File Structure\n\n- `app.py`: Main file to run the flask app\n- `handler.py`: File to handle the prediction\n- `logger.py`: File to log the information\n- `templates/`: Folder contains the html files\n- `static/`: Folder contains the css and js files\n- `notebooks/`: Folder contains the jupyter notebooks\n- `artifacts/`: Folder contains the dataset\n\n## Conclusion\n\nThis is end-to-end machine learning project that can predict the input review is positive or negative. The project is deployed on Azure and can be accessed using the following link: https://reviewclassifier.azurewebsites.net/\n\n### Give a star if you like the project. Follow me for more updates!","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanulthanura%2Freviewclassifier","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmanulthanura%2Freviewclassifier","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanulthanura%2Freviewclassifier/lists"}