Interesting. I think we would have to do, on button click/kick off - get all words and count, then user can filter them out. (or just get all words, then after user filters, then get count).
You should make this addon if you need help getting started let us know we’ll help you out. You probably want to do this with if you are new to addons then contentScript and addon-sdk. If more experienced you might opt for Cu.Sandbox https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XPCOM/Language_Bindings/Components.utils.Sandbox from bootstrap.js (i dont know how intensive the calculations for a word cloud are,but you can throw that off to a WebWorker after getting the words from the dom)