动态文本模式检测算法?

发布于 2024-12-07 20:18:39 字数 105 浏览 5 评论 0原文

我想知道是否存在这样的算法。我有一堆文本文档,并且希望在所有这些文档中找到一个模式(如果存在模式)。请注意,我并不是试图对文档进行分类,我想做的只是找到一个模式(如果某些文档中存在该模式)。谢谢!

I was wondering if such algorithm exists. I have a bunch of text documents and would like to find a pattern among all these documents, if a pattern exists. Please note im NOT trying to classify the documents all i want to do is find a pattern if it exists among some documents. Thanks!

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

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

发布评论

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

评论(1

请恋爱 2024-12-14 20:18:39

现在的问题有点模糊......你需要知道你在寻找什么才能找到它。
一些可能有用的想法 -

  1. 分别获取每个文档的 n-gram 计数(n = 1,2,3,4),然后比较文档中每个 ngram 的频率。这应该可以帮助您找到所有文档中常见的短语。
  2. 获取词性标注器将所有文档转换为 POS 标签流,然后执行与 1 相同的操作
  3. 使用 PCFG 软件(例如斯坦福解析器)获取所有文档中所有句子的解析树,然后尝试找出不同文档的句子结构分布的相似程度。

The question as it stands now is kinda vague.. you kinda need to know what you are looking for in order to be able to find it.
Some ideas that may be of use -

  1. Get n-gram counts for each document separately for n = 1,2,3,4 and then compare the frequencies of each ngram across the documents. This should help you find commonly occuring phrases across all documents.
  2. Get a part of speech tagger to get convert all the docs into a stream of POS tags and then do the same as 1
  3. Use a PCFG software such as the Stanford Parser to get parse trees for all the sentences across all the documents, and then try to figure out how similar the distribution of sentence structures are for different documents.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文