How a word cloud is built from text
The pipeline has three stages. First the text is tokenized: it is lowercased and split into runs of letters and digits using Unicode character properties, so words in Latin, Cyrillic, Greek and other alphabetic scripts are found rather than only ASCII. Punctuation, quotes and symbols are discarded as separators.
Second the tokens are filtered and counted. Words shorter than the minimum length you set are dropped, stop words are removed when that option is on, and the remainder are tallied into a frequency table. The top 120 words by count are kept, which is roughly the most a canvas of this size can display legibly.
Third each surviving word is assigned a size by linear interpolation between the smallest and largest counts in that list, from about 14 pixels up to about 82. Note the consequence: size is relative to the range in your text, not absolute. A word appearing 50 times is drawn at maximum size whether the runner-up appeared 49 times or 3, so the visual hierarchy exaggerates small differences in a flat distribution.
Why stop words matter more than anything else
In any natural English text the most frequent words by a wide margin are the, of, and, to and a. Without filtering, a word cloud of any document is a picture of English grammar rather than of that document, and the words that actually distinguish the text are pushed to the smallest sizes.
The stop word list removes those function words so the remaining frequency signal reflects subject matter. This is the same preprocessing step used in search indexing and in classical text classification, and it is the single change that turns a word cloud from decorative into informative.
The minimum length filter does related work more crudely. Raising it to four or five removes short words the stop list missed, along with initials and stray tokens. It also removes legitimate short words, so if your subject matter involves terms like API, tax or oil, keep the minimum low and rely on the stop list instead.
How the words are placed on the canvas
Placement uses an Archimedean spiral with rectangle collision detection, which is the standard approach. Words are laid out largest first. Each word starts at the centre and walks outward along a spiral, testing its bounding box against every word already placed, and stops at the first position where nothing overlaps. If it reaches the end of the spiral without finding a spot, it is dropped.
That is why the biggest words end up in the middle and why a word you can see in the text sometimes does not appear at all: the canvas filled up before its turn. It is also why the layout is dense rather than neatly arranged, since the algorithm optimises for filling space rather than for reading order.
Roughly three in ten words are rotated ninety degrees, chosen by hashing the word so the same text always produces the same rotation pattern. Rotation lets tall thin gaps be used and gives the cloud its characteristic woven look. Because layout on the main thread is expensive, the rendering is debounced by a quarter of a second, so the cloud updates shortly after you stop typing rather than on every keystroke.
What a word cloud can and cannot show
A word cloud is good at one thing: giving a fast, non-quantitative impression of what a body of text is about. For a set of open-ended survey answers, a batch of reviews or a long transcript, it surfaces recurring themes quickly and is easy for a non-technical audience to read.
It is a poor instrument for comparison. Area scales with the square of the font size, so a word rendered twice as tall looks four times as prominent, which systematically exaggerates differences between the top words. Position carries no meaning beyond rank, colour carries none at all here since it cycles through a fixed palette, and rotation is decorative. Two words of similar size cannot be reliably ranked by eye.
It also ignores everything about language beyond exact word forms. Run and running are counted separately, since there is no stemming or lemmatisation, and multi-word phrases are split. For questions of the form which term is most common or how did usage change, a ranked frequency table or a bar chart answers precisely what a cloud only suggests. The canvas exports as a PNG at 1200 by 600, which suits a slide or a report figure.