ryanjgallagher / shifterator

Interpretable data visualizations for understanding how texts differ at the word level
Apache License 2.0
273 stars 29 forks source link

ZeroDivisionError: division by zero #32

Closed keyuchen21 closed 2 years ago

keyuchen21 commented 2 years ago

'labMT_English' works fine while 'NRC-emotion_anger_Nepali' return errors.

Could you help me with this?

image

ryanjgallagher commented 2 years ago

Hey there, sorry that it took so long to get back to you on this.

Are your texts in English or Nepali? I believe the error that you're seeing could only happen if none of the words in the sentiment dictionary appear in your texts. If you were trying to measure the sentiment of English text using the Nepali dictionary (or vice veresa), then this is the kind of error you'd get.

If you want to measure sentiment using the Nepali dictionary and your text isn't already in Nepali, then you'll need to translate it before using Shifterator.