0
$\begingroup$

I have a large unlabeled dataset and I want to predict sentiment for each document in this dataset. I want to know, is it possible that I can use BERT for sentiment analysis of unlabeled data? I have seen so many tutorials and read the blog posts but I couldn't find one. All shows the use of BERT on datasets that are already labeled such as the IMDB review dataset or Yelp review.

$\endgroup$

1 Answer 1

2
$\begingroup$

Bert is a pre-trained language model with objectives like masked token prediction and next sentence prediction. So, it doesn't have any setup to do sentiment analysis,but you can use the pre-trained information to do the same.

There are couple of ways to solve your problem, they are

  1. Annotate few of your documents and fine-tune the model for sentiment analysis.
  2. Get open-source sentiment analysis datasets which fit your requirement, train Bert on the data and use the same classifier for your purpose (But this will work only if both data distributions look the same).
$\endgroup$
2
  • $\begingroup$ Thank you for your comment. Can you please share any tutorials or relevant resources where this kind of method (both of your suggestions) has been used? It would give me some background to proceed with my problem. $\endgroup$ Commented Oct 8, 2020 at 10:07
  • 1
    $\begingroup$ For the first one, you need to annotate your data and refer these github.com/RaviTejaMaddhini/… or coursera.org/projects/sentiment-analysis-bert for doing sentiment analysis. I don't have any references for the second one. $\endgroup$ Commented Oct 9, 2020 at 7:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.