Skip to content

Nish-19/BERT_Tutorial

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

BERT_Tutorial

This code is written as a supplement to the blog BERTology Transfer Learning in Natural Language Processing written on my website.

Here, BERT is used on a sentence pair for stance detection on Covid-Stance dataset. The dataset is taken from twitter and the code to rehydrate the tweets is given in the dataset folder.

  • bert_embeddings.py - uses BERT based embeddings for the stance detection task.
  • bert_fine_tune.py - Performs Fine-Tuning using the BertForSequenceClassification module of HuggingFace Transformers.

Before running the above codes, rehydrate the Covid-stance dataset using

cd datasets

python info_extractor.py

python split_traindata.py

About

Code for using BERT embeddings and fine-tuning for classification tasks

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages