NLP and WordCloud

I had answered 829 questions in Quora, then promptly scraped almost all those answers and created my own simple github page. I wanted to do more with what I have written. First among them is to create wordclouds. The word cloud creating algorithms provide unique solution to the problem of placing the words that are having different sizes and shapes. Jason Davies' blog about creating the word cloud is eye opening and his repo on d3.cloud() will be center of attraction in this notebook

Libraries Used:

Importing the wordcloud directly from the observable notebook still had some challenges. One is, the HTML section element can confine how the wordcloud svg is rendered. After placing the imported element outside the section element, the cloud rendered. When it was inside the section element, the DOM was populating with all the sub-elements. Only they are not visible on the page.

After reading through multiple notebooks on NLP libraries, the NLP with Compromise notebook nailed it. Compromise does the heavy lifting, with helper function that get word frequencies out of the answers, and put them on the cloud itself.

d3-cloud library that is native inside observable is different from the library that is refered by the books and tutorials out there. The custom layouts like word cloud needs additional study, and lot more time to make it right. My study here is still incomplete. I have decided to spend lot more time programming with text going forward, in Javascript.