I would like to know if it would be possible to build a dictionary using terms/words included in a dataset, in order to be used for sentiment analysis (and build a sentiment analysis classification model from scratch). Some context: I have scraped a lot of texts (documents). I cleaned the dataset, removing sotpwords and punctuation. Now I have a list of unique words. For example:


This is the list of words, not of sentences, so it is missing the context. I read about different models and techniques (e.g. Tf -idf), but I have never used them before and I do not know which steps I should follow in order to build it. For example: is it doable to use a dictionary (English, Spanish, Italian) in pdf, and extract all the words from it? How could I assign a ‘sentiment’ to each word? Manually and with no context it would be impossible, so I hope there could be different approach to do it.

  • $\begingroup$ What is your actual question? I'm a bit lost. Also, if you want to do lexicon-based sentiment analysis, plenty of existing lexicons exist, i.e. kaggle.com/rtatman/sentiment-lexicons-for-81-languages. Why do you want to build one yourself from scratch? $\endgroup$ – Valentin Calomme May 7 at 13:34
  • $\begingroup$ @Valentin Calomme, Sorry if I was not clear. I would like to build a dictionary from scratch because I do not know how to use the already existing ones. I am looking for some dictionary in Italian in order to analyse documents (not tweets), but ai have no idea on how to do it. $\endgroup$ – MickyMouse May 7 at 14:06
  • $\begingroup$ Let's say you manage to build such a dictionary, how will you use it to perform sentiment analysis? $\endgroup$ – Valentin Calomme May 7 at 14:07
  • $\begingroup$ This was my question, i.e. how could I assign a ‘sentiment’ (or perform a sentiment analysis) once built such a dictionary? $\endgroup$ – MickyMouse May 7 at 14:13
  • $\begingroup$ I would like to know if it could be something doable or if it would be better to use an already existing one. Mostly dictionaries are in english and there is a lack of information for those in Italian or Spanish languages. So I would have liked to understand if it would have been possibile to improve a dictionary or a sentiment analysis in different language by building a dictionary from scratch (more topic focused) $\endgroup$ – MickyMouse May 7 at 14:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.