Skip to content

techb/WordCloud_API

Repository files navigation

WordCloud API

API to generate word/tag clouds.

Why? It's 2019, tag clouds died with page hit counters...

Great question! Because I've always liked them. Yes, they've been done really wrong. But I feel they can still give a good sense of weight to a body of text or terms. By giving a visable difference of weighted words, you can, at a quick glance, understand the what a blob of information is trying to portray.

Okay, point made, kinda...

You're right! Let's demonstrate an example. Let's use a book, "Little Big Man" by Thomas Berger. I googled obscure books, and this one popped up. I've never read it, but put the summery found HERE, through this API.

Little Big Man Word Cloud

Now, from this word cloud alone, we can gather that:

  • It's about a white guy and indians
  • Somewhere in or close to Kansas, Denver, or Cheyenne
  • Most likely dramatic. kill, soldier, depressed, ambushed

Not exactly my genre or type of book, but I can gather that by glancing over this image instead of reading a synopsis of the literature. This can go beyond books. Scrape a website and get a general sense of what it's about. Need to present a speach or lecture? Run your notes through the API and find what you might be talking too much on, or see the subjects that are neglected.

But mostly I just wanted to get into API dev, and this is great for learning. Handling images, multiple variable end points, and of course Python =)

End Points

  • GET /colors/<string: search_color>
    • optional <string: search_color>
  • POST /cloud
    • BODY {"terms": "A big string of text to make cloud", "color": "Greens"}

Examples

Little Big Man Word Cloud Color List

Little Big Man Word Cloud Color Select List

Little Big Man Word Cloud Image

TO-DO

  • Image Masks (upload images to be masked against)
  • Custom Colors (trasnparent background, inherited masked text colors, other image formats, stop word filter)
  • Authentication (User profiles, OAuth support, voting?, mobile apps?)
  • Where is the Docker Files??? Coming Soon, or make a Pull Request if you've made them

About

API to generate word/tag clouds.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages