facebookresearch / EmpatheticDialogues

Dialogue model that produces empathetic responses when trained on the EmpatheticDialogues dataset.
Other
444 stars 63 forks source link

Emotion Classifiers #32

Closed manzar96 closed 4 years ago

manzar96 commented 4 years ago

Hi, I would like to ask in which dataset the classifier was pretrained and what was the architecture of the classifier.

EricMichaelSmith commented 4 years ago

Hi! A fastText classifier (https://fasttext.cc/) was trained out of the box to prepend emotion and topic labels.

manzar96 commented 4 years ago

Excuse me but I can't understand the concept exactly. The pretrained classifier was used to extract top k sentiments and the you prepended them to the input. (Am I right?) So that classifier was trained given the emotion labels of Empathetic Dataset or in another dataset?

EricMichaelSmith commented 4 years ago

I didn't train this particular classifier, but from the paper it looks like it was trained on the ED emotion labels: "To provide emotion signal, we train a classifier to predict the emotion label from the description of the situation written by the Speaker before the dialogue for the training set dialogues of ED (EMOPREPEND-1)."

manzar96 commented 4 years ago

ok! thank you a lot!

EricMichaelSmith commented 4 years ago

Sure thing :)

manzar96 commented 4 years ago

Can you please provide us the pre-trained classifier?

EricMichaelSmith commented 4 years ago

Hi! See notes for this in the README: do wget https://dl.fbaipublicfiles.com/parlai/empatheticdialogues/models/fasttext_empathetic_dialogues.mdl.

manzar96 commented 4 years ago

Thanks for your help! I would like to wrap this model and use it on my own code in another project (using pytorch). However I can not understand if that's possible asfasttext.load_model() returns a FastText object. Can you please provide me some details to handle this issue?

EricMichaelSmith commented 4 years ago

Sorry for the delay! So, I've never tried porting FastText to PyTorch but I'm sure it's possible - Googling "fasttext to pytorch" gives lots of results that might help, for instance. Good luck!