Coder Social home page Coder Social logo

alexliqu09 / sentiment-analysis-on-amazon-reviews Goto Github PK

View Code? Open in Web Editor NEW
6.0 2.0 1.0 902 KB

In this project, we compared Spanish BERT and Multilingual BERT in the Sentiment Analysis task.

Python 7.89% Jupyter Notebook 92.11%
bert-model sentiment-analysis sentiment-classification nlp transformers amazon-reviews deep-learning artificial-intelligence fine-tuning multilingual-bert

sentiment-analysis-on-amazon-reviews's Introduction

Applying BERT Fine Tuning to Sentiment Classification on Amazon Reviews

Abstract

Sentiment analysis has made great progress in recent years, due to the fact that companies want to have a better understanding of how their products are classified by their consumers. However, despite the great advances that emerge in the field of artificial intelligence to solve this task, the most robust models are found in the English language. In the present work, we compare two Artificial Intelligence models that have monolingual and Multilingual approaches, which are Spanish BERT and Multilingual BERT, models based on BERT's transformer Architecture, to which the fine tuned technique was applied for the task of Sentiment analysis on the Amazon reviews dataset in Spanish using the accuracy and F1 score metrics. Finally, it was found that the Spanish BERT model has the best results for the sentiment analysis task on the Amazon reviews dataset in Spanish.

this paper is available here

Pipeline



Prerequisites

  • Linux / Window
  • Python3

Clone this Repository

git clone https://github.com/alexliqu09/Sentiment-Analysis-on-Amazon-Reviews.git

Train model

If you want to train the models use the colab Notebooks

Run the work in local

If you want to proof the work , you should run the following commands:

  • First , Install requeriments file:
pip install -r requeriments.txt
  • Second , download the Weights of Beto & MBERT and put them in this directory (not available now)

  • Third , Start Streamlit server:

streamlit run main.py
  • Note:
Local host : http://localhost:8501 
Network URL:  http://192.168.0.5:8501

Run with Docker 🐋

#Bulding docker image 

docker build -t bert .

#RUN container
docker run -t -p 5000:5000 --name betocontainer bert

open http://172.17.0.2:8501

If you find useful our work , please cite this paper:

@inproceedings{@lvrBERT,
  title={Applying BERT Fine Tuning to Sentiment Classification on Amazon Reviews},
  author={Lique, Alexander and Vásquez, Diego and Rios, Manuel },
  year={2021}
}

Please cite the following paper (arXiv) if you found this dataset useful:

@inproceedings{marc_reviews,
    title={The Multilingual Amazon Reviews Corpus},
    author={Keung, Phillip and Lu, Yichao and Szarvas, György and Smith, Noah A.},
    booktitle={Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing},
    year={2020}
}

sentiment-analysis-on-amazon-reviews's People

Contributors

alexliqu09 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

diego-vasquez

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.