In case i have a shorter text, the resulting image will contain tiny words because the occurrence is not as high as in long text(larger sample). I want to consider weighted order as well, not just number of occurrences to avoid this issue.
What would be a good way to solve this?
PS: the weightFactor method is useless because the words won't fill the entire canvas.
PPS: right now I check if first/largest value is at least 15, if not, i will multiply all values by 15. This kinda works but I would prefer for properly weighted order to take precedence over this kinda random approach.
In case i have a shorter text, the resulting image will contain tiny words because the occurrence is not as high as in long text(larger sample). I want to consider weighted order as well, not just number of occurrences to avoid this issue.
What would be a good way to solve this?
PS: the weightFactor method is useless because the words won't fill the entire canvas. PPS: right now I check if first/largest value is at least 15, if not, i will multiply all values by 15. This kinda works but I would prefer for properly weighted order to take precedence over this kinda random approach.