attardi / deepnl

Deep Learning for Natural Language Processing
GNU General Public License v3.0
457 stars 117 forks source link

Train Emotion Specific Word Embeddings #39

Open shreshthamundra opened 8 years ago

shreshthamundra commented 8 years ago

I am trying to generate emotion specific word embeddings with a similar spproach as SSWE. The sentiment is a three class label, positive negative and neutral. My emotion set has eight classes. Can you help me with the changes I need to make.

In reader.csv I have changes the default_polarities to a map of length 8. Are their any other changes. The code compiles but I am not sure if its producing correct word embeddings.

attardi commented 7 years ago

There are changes to make in the loss function (in sentiwords.pyx line 139) and its derivative, which is currently a hinge loss on a single polarity value.