Skip to content

In this project we study the paper: "Sentiment Classification using Document Embeddings trained with Cosine Similarity", by Thongtan et al. and try to test the model on a new dataset. The new dataset used for testing consists of amazon reviews and the results obtained confirm the need to do further testing on different datasets to prove the theo…

Notifications You must be signed in to change notification settings

mkodeih/NLP-Project

Repository files navigation

Title : Sentiment Classification using Document Embeddings trained with Cosine Similarity

This code was downloaded from the original work : Code for the ACL-SRW 2019 paper: "Sentiment Classification using Document Embeddings trained with Cosine Similarity".

This repository contains Java code to train document embeddings using cosine similarity, simply run the project in order to do so. All hyperparameters that need adjusting are in the top of the file NeuralNetwork.java, default hyperparameters are the same as in the paper.

There are also options to train them using dot product and L2-regularized dot product.

1 - To run the original work done on the IMDB dataset the datase needs to be downloaded:

Run ensemble.py in order to test the combination of document embeddings with NB-weighted bag of ngrams.

IMDB data: unigrams, unigrams+bigrams, unigrams+bigrams+trigrams

Trained embeddings (using cosine similarity): train vectors, test vectors

2 - To run our testing on the Amazon dataset the files need to be downloaed from :

Amazon Reviews data: unigrams, unigrams+bigrams, unigrams+bigrams+trigrams

Trained embeddings (using cosine similarity): train vectors, test vectors

About

In this project we study the paper: "Sentiment Classification using Document Embeddings trained with Cosine Similarity", by Thongtan et al. and try to test the model on a new dataset. The new dataset used for testing consists of amazon reviews and the results obtained confirm the need to do further testing on different datasets to prove the theo…

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published