Thanks! The approach isn’t specific to binary classification, but you will have to make some minor adjustments. Off the top of my head, you will need to either change the BinaryClassificationProcessor class or define your own Processor subclass. The BinaryClassificationProcessor simply returns 0 and 1 as the labels, it doesn’t actually check the data for labels. Your new Processor subclass will have to return a list of all the labels in your multiclass dataset.
A more straightforward, but way hackier, solution would be to change the line (1st line, 6th cell, in BERT.ipynb) that calls the
get_labels() method to simply assign a list of the proper labels to
label_list = ['positive', 'neutral', 'negative']
Other than that, everything else should work as is.
Let me know if you run into any trouble, and I’ll see if I can help.