jasondavies / d3-cloud

Create word clouds in JavaScript.
https://www.jasondavies.com/wordcloud/
Other
3.82k stars 1.08k forks source link

Exclude user specific words #165

Closed NatNgs closed 2 years ago

NatNgs commented 4 years ago

Hello, this is more about a suggestion of feature.

As a French speaker, I tried the d3-cloud with some French text, but unfortunately, all the particles like "Le", "La", "Et" (The, And, ...) appear in big in the middle (logical, there are the most used words).

We may have a text fields like "Excluded words", inside it I may write "Le La Et" (or "The And Of" in English for example) so that the counter does ignore these words from the main text.

It may also be used to ignore a specific word user want to exclude from the generated picture more easily than going to the text itself and replace the word everywhere it appears.

jasondavies commented 2 years ago

This library only deals with placement for a given set of words. It's up to the developer to pre-filter words before handing them to d3-cloud.