Skip to content

Unsupervised domain adaptation with BERT for Amazon food product reviews sentiment analysis.

License

Notifications You must be signed in to change notification settings

EmreTaha/Unsupervised-Domain-Adaptation-with-BERT

Repository files navigation

Unsupervised-Domain-Adaptation-with-BERT

A novel approach for BERT usage in an adversarial unsupervised domain adaptation manner for a NLP tasks. The topic is Unsupervised domain adaptation between two Amazon product reviews categories with BERT and a domain discriminator network for the sentiment analysis.

Please cite original BERT paper when using the code.

The code based on BERT in the TF-Hub. BERTOptimizer.py file is modified for freezing the network partially.

Getting Started

Upload ipynb file, BERTOptimizer.py, utils.py files to Google Colab. The data (from Stanford) is downloaded and processed within the code

Requirements

  • Python 3.6
  • pandas
  • Tensorflow 1.x
  • Numpy
  • Matplotlib
  • Scipy
  • Google Colab