Search code examples
pythonnlpdata-visualizationdata-analysisword-cloud

Is there any visualization technique better than Word Cloud in python?


I am trying to analyze a few papers and wanted to make sure Word Cloud fits the best. For example, the word cloud doesn't consider "Not cheap", "Expensive", "Costly" as similar words and the chances of missing them in the cloud is high. This might divert the purpose of the analysis.

Please let me know if there is an alternative to this? or Is there an efficient way of using the word cloud to avoid such scenarios?

Many Thanks in Advance.


Solution

  • You could generate a new dataframe that combines words that are synonyms and sums their count.

    To find synonyms of words, you can use PyDictionary.

    Then you can transform your data frame to club synonyms together. For example if you have:

    "Not Cheap" = 4
    "Costly" = 0
    "Expensive" = 10
    

    You can transform it to:

    "Not Cheap/Costly/Expensive"  = 14
    

    Obviously you lose some information this way, but for your purpose it might be better suited.