Word Cloud plugin

Summary: A Word Cloud that abstractly summarises the content of your site.

:link: GitHub: https://github.com/merefield/discourse-word-cloud Word Cloud Plugin

:arrow_right: Install: Follow the plugin installation guide.

Features

Represents the posts of your community as a Word Cloud summary. The words are animated and if clicked will perform a simple word search.

image

Get to it by hitting Word Cloud on the Hamburger menu or navigating to yoursite.com/word_cloud - NB you have to be logged in as a registered user to see it and it’s only on desktop.

To refresh data, Trigger the job:

Otherwise this runs every hour.

Interested in the data?

My intention was just to paint a picture.

If you want to see the data, just go to yoursite.com/wordcloud.json

Configuration

Settings … so … many … settings:

  • Restrict to specific Categories:

  • Word Cloud Ignore List (300 words by default, using a list I found here ):

NB Word stats are updated every hour now (which is probably still excessive, but for the time being makes it easier to checkout changes in Production as we go through a lot of initial code evolution).

NB#2 I’ve not yet considered other languages here beyond English (it’s certainly not tested). The current word manipulation may not work well in some languages. Suggestions & PR’s welcome.

If you select no Category (default) you get a scan of all forum Posts (PMs and all). If you add just one Category, word stats are restricted to that etc.

Known issues

  • Currently doesn’t support Safari. This issue was introduced once I added responsiveness. I’m very busy these days, so if you can find a solution PR Accepted.

TODO

  • It may not support other languages. I’ve only tested English. PR Welcome.
  • The menu item has localisation support, but if no-one has yet PR’d your localisation yet, please consider doing so or otherwise it will remain a key code …
  • Add option to have it appear on the front screen above Topic Lists (much like the Discourse Tag Cloud Theme Component). PR Accepted.

Creds

Similar projects

If you like this you might also like my:

11 Likes

OMG I was literally just thinking about this. Magic Thanksgiving psychic powers!

What about an option to make the tag cloud based on tags rather than post text?

1 Like

Your wish is my command :mage: There’s just no formal Topic for it yet: GitHub - merefield/discourse-tc-tag-cloud: A Discourse Theme Component that displays a tag cloud above the tag lists on the tags page :tada: (which as a TC is even simpler to install).

2 Likes

Oooh!

Hmmm. I installed the TC and enabled it in my theme, but it doesn’t seem to be doing anything on https://ask.fedoraproject.org/tags

1 Like

It’s FYI desktop/tablet only.

Yeah, I’m using Firefox… same in Chrome?

1 Like

Looks like you have a set of script permissions violations in your console. You need to give your site the right to run these scripts. Look at content security policy script src.

See: Mitigate XSS Attacks with Content Security Policy

2 Likes

Awesome, thanks for the quick tech support. :slight_smile:

1 Like

It understads only alphabets a…z and just drops out like scandinavian åäö.

And the hamburger menu link is funny [fi.word.cloud.hamburg… :wink:

That’s possible. I’ve only tested English. I made this clear in the original topic. PR welcome.

1 Like

Yes you did. I missed it. Well, I unistall it then (and I have no idea what is PR because I don’t use git :upside_down_face: )

1 Like

You will need to PR. There’s localisation support for the menu item, but users will need to PR additional languages.

3 Likes

This is now responsive to width: IMPROVE: make the word cloud responsive! · merefield/discourse-word-cloud@b039372 (github.com)

You can now modify the Word Cloud dimensions. This will help to include more words.

I recommend leaving width and increasing the height if you so wish:

FEATURE: add ability to change Word Cloud size · merefield/discourse-word-cloud@376ee26 (github.com)

2 Likes

Is word cloud the same one for all, or one for each?

You see we have locker mechanism, to set users only have some regions but not all categaries, when searching, it also suits only for that one account’s available posts.

Same for all. To tailor the output would require a lot more server resources so I haven’t gone down that road. Also it needs a sufficiently large dataset to make sense so creating one for small sets of words might not lead to very interesting results.

The word cloud is so abstract I’m not sure it matters if some categories are locked. However on some communities it could be an issue depending on the content. The search results from clicking a word will only return Topics to which you have access of course.

You can always exclude sensitive Categories.

PRs always considered.

1 Like

Thank you @merefield for this plug-in, very helpful in our team instance.

Is there a setting or a way to place the word cloud at the header of the main page of our discourse?

1 Like

No there is not. PR accepted.

One potential blocker is the lack of support for Safari at this stage. Someone might like to help out there.

Note that the slightly more practical Discourse Tag Cloud theme component (linked in the OP) does.

1 Like