The creation background

It has always been a personal dream to be able to generate a cool cloud image at any time.

Long long ago, wrote a simple version: http://houbb.github.io/tools/… .

The effect is as follows:

But there are a few hiccups:

  1. Cannot automatically segment words
  2. Font size cannot be set based on word frequency

So I took a look around on GitHub and discovered Kumo, an open source tool. To get started, I found that it took more than 10 lines of code to implement a basic cloud image.

This was not elegant, so I decided to implement an easier to use version based on Kumo.

word-cloud

Word – Cloud is a cloud-map generation tool designed for Java.

features

  • Minimalist API, one line of code to do everything
  • Support custom cloud image background
  • Support Chinese and English word segmentation, transparent to users by default
  • Support pause word filtering, transparent to users by default
  • Supports a variety of user-defined configurations

Change log

Quick start

Maven is introduced into

< the dependency > < groupId > com. Making. Houbb < / groupId > < artifactId > word -- cloud < / artifactId > < version > 1.2.2 < / version > </dependency>

use

WordCloudHelper. WordCloud (" do is a small town called DE the decline of Dartmouth buried under an ancient kingdom of abandoned, named st. nest. The kingdom was destroyed by the plague and abandoned because of the ancient god of light called radiance, who could spread the plague through her thoughts. Any worm that was destroyed by the plague was ruled by instinct and lost its mind. \n" + "The master of this kingdom - the King of Pale, naturally will not sit idle, he in the depths under the scope of the Holy Nest, the use of another ancient power" void "can suppress the characteristics of light, created the vessel race. One of the selected vessels was used to seal the plague and was named the Hollow Knight. In order to secure the seal, the White King sought three dream keepers to further consolidate the seal. The names of the three dream keepers were Lurian the Watcher, Monomon the Guru, and Hera the Beast. But then the Pale King disappeared, and the power of the imperfect vessel gradually weakened, and was finally controlled by the Light. The main character will travel throughout the Nest. In the resting place, we are helped by the followers and relatives who once lit the light, the only remaining race of the moth race, to obtain the dream weapon that is the same as the power of the light, the dream nail. The Dream Nail reads the inner thoughts of the creature and can break the protection of the Dream Keeper, entering its dream and killing the Dream Keeper. After killing the three Dream Keepers and unlocking the Seals, the optional endings are reaching the Blackegg Temple in the Crossroads and defeating the Hollow Knight, or going to the new location in the God-Seeker update, Godhouse, and challenging the Nest Pantheon. );

Effect:

Support background

With the background of a whale, we can make the text appear as an image:

String imagePath = "backgrounds\\whale_small.png";
WordCloudHelper.wordCloud(text, "out_bg.png", imagePath);

The effect is as follows:

Road-Map

  • [x] Default shape, image.
  • [X] Introduce the background of the image
  • [] Default font optimization
  • [] image center

Open source

I originally wrote the gadget for my own amusement, but I felt I should open source the app.

Without Kumo’s open source, there would be no such tool.

Source address: https://github.com/houbb/word-cloud

If you like it, you can give a star to encourage the author.

I hope to witness the growth of the most useful cloud mapping tools with you.