Skip to content

This code is for the EACL 2021 paper: Variational Weakly Supervised Sentiment Analysis with Posterior Regularization

Notifications You must be signed in to change notification settings

HKUST-KnowComp/VWS-PR

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VWS-PR

  • Source code for EACL 2021 paper Variational Weakly Supervised Sentiment Analysis with Posterior Regularization

Requirements

  • Python3
  • tensorflow-gpu==1.14.0
  • tqdm
  • sklearn

Usage

  • VWS-PR
python yelp.py
python imdb.py
python amazon.py
  • VWS
python yelp.py --beta 0.0
python imdb.py --beta 0.0
python amazon.py --beta 0.0

Contextualized Eembeddings

We also implement a model which uses contextualized embeddings (BERT) as the input of CNN.

cd Contextualized
python yelp.py
python imdb.py
python amazon.py

Micro F1 score using contextualized embeddings

Yelp IMDB Amazon
0.8904 0.8362 0.8389

About

This code is for the EACL 2021 paper: Variational Weakly Supervised Sentiment Analysis with Posterior Regularization

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages