如何从长搜索字符串中查找趋势标签

发布于 2024-08-09 12:53:41 字数 246 浏览 2 评论 0原文

我希望根据用户的搜索在我的网站上添加趋势标签。我没有看到简单解决方案的问题是如何轻松地从搜索字符串中提取重要术语。例如,许多用户可能出于不同目的搜索“Visual Studio”。例如,“Visual Studio 2010”、“Visual Studio 单元测试”、“Visual Studio Web 表单组件”。在这 3 个搜索中,“视觉工作室”是热门搜索。算法如何注意到“Visual Studio”在大多数情况下会与许多其他单词混合在一起?

谢谢你!

I would like to have a trending tags in my website according to searches users made. The problem I'm not seeing an simple solution for is how to easily extract the important terms out of a search string. For example, many users might search for "visual studio" with different purposes. For example, "visual studio 2010", "visual studio unit testing", "visual studio web forms components". In those 3 searches, "visual studio" is trending. How can an algorithm notice that since "visual studio" in most cases will be mixed with many other words?

Thank you!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

擦肩而过的背影 2024-08-16 12:53:41
  1. 将每个搜索查询拆分为单个单词的数组。
  2. 计算单词之间的距离(越近越好 => 值越高)
  3. 为所有查询中的每个单词对添加此单词距离。

具有较高值的​​单词对是您的“趋势标签”。

  1. split every search query into an array of single words.
  2. calculate the distance between the words (the nearer, the better => higher value)
  3. add this word distance for each wordpair across all queries.

The wordpairs with the higher values are your "trending tags".

许一世地老天荒 2024-08-16 12:53:41

看看这个 codeplex 项目

http://www.codeplex.com/TheTagCloud

包括您可以将 html 文件作为输入传递给该函数,并将返回标签云。

Have a look on this codeplex project

http://www.codeplex.com/TheTagCloud

Includes a function that you can pass an html file to as input and will return a tag cloud.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文