I was wondering how to create a tag cloud based on post contents
I'm trying to think of how to create a tag cloud based on the content of threads/posts. I haven't created one yet but I believe the best way to create one would be to take each thread and split the text based on space. I would then cycle through the words and remove any word under say 3 characters. I would then iterate over the remaining words removing noise words (which I would put in noise array) and any words that weren't in that array I'd add to a 2 dimension array called tags (with a count). If the word exists in the array I'd increment one to the value in the array, if not I'd add the result to tags. Afterwards I'd have the ability to sort by name or count. However, I don't know if this is the most efficient way to do this. Does anyone know of a better method?
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)