jasondavies / d3-cloud

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

[Feature request] Set phrase weight via number in string instead of repeat times #119

Open MurzNN opened 7 years ago

MurzNN commented 7 years ago

Very often we need to create tag cloud with specific manual tag list, not with auto-generated from long text.

Now there are "One word per line" mode (but maybe better rename it to "Use whole phrases from lines") that allow this, but too hard to tune up phrase size (weight) - we must repeat needed phrases many times for increase it size in cloud.

Please create some alternative mode for set weight of phrase via manual number.

For example, add delimiter symbol and look at the number after delimiter, here is example with delimiter "/":

Very main tag/10
Other main tag/10
Middle tag/5
Tag 4/3
Tag 5/2
Small tag 1/1
Small tag 2/1

This is much better that now way - creating manually text like:

Very main tag
Very main tag
Very main tag
Very main tag
Very main tag
Very main tag
Very main tag
Very main tag
Very main tag
Tag 4
Tag 4
Tag 4
Small tag 1
Small tag 2

Or maybe you can provide another way to solve this. What do you think about this?

Danita commented 3 years ago

I loved the idea of this library, but I encountered the same problem; and in my case the numbers are in the thousands per tag.