How to find a trend from a long search string
I would like to have a trend on my site according to user requests. The problem I don't see an easy solution to is how easy it is to extract important terms from the search bar. For example, many users may search for "visual studio" for different purposes. For example, "visual studio 2010", "visual studio testing", "visual studio web form components". In these three searches, "visual studio" is trending. How can an algorithm notice that since "visual studio" will in most cases be mixed with many other words?
Thank!
+2
Joao de Araujo
source
to share
2 answers
- splits each search query into an array of individual words.
- calculate the distance between words (the closer the better => higher value)
- add this word spacing for each vocabulary across all queries.
Vocabulary words with higher values ββare your "trends".
+2
ty812
source
to share
Have a look at this codeplex project
http://www.codeplex.com/TheTagCloud
Includes a function through which you can pass an html file as input and return a tag cloud.
+1
Chris ballance
source
to share