来自包 tm 的 findAssocs 出现问题

编程入门 行业动态 更新时间:2024-10-17 12:31:51
本文介绍了来自包 tm 的 findAssocs 出现问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时送ChatGPT账号..

我正在尝试使用 tm 包在术语文档矩阵中查找与特定单词相关的单词.

I am attempting to find words associated with a particular word in a term document matrix using the tm package.

我正在使用 findAssocs 来做到这一点.findAssocs 的参数是:

I am using findAssocs to do this. Arguments for findAssocs are:

x:术语-文档矩阵.term:包含一个术语的字符.corlimit:相关性下限的数字.

我一直得到 numeric(0) 作为我的结果

I am consistently getting numeric(0) as my result

示例:

findAssocs(test.dtm, "investment", 0.90)
>numeric(0)

有没有人熟悉 findAssocs 并知道我做错了什么?或者有没有人更广泛地知道 numeric(0) 结果可能意味着什么?

Does anyone have familiarity with findAssocs and know what I am doing wrong? Or does anyone know more broadly what the numeric(0) result could mean?

非常感谢您提供任何帮助.

Thank you very much in advance for any help.

推荐答案

我得到同样的 numeric(0),我想是因为我的 语料库中只有一个文档,所以文档术语矩阵只有一列.您可能想要测试 TermDocumentMatrix() 并查看您是否有 多列矩阵.也就是说,我如何在一个文档中找到关联?.

I'm getting the same numeric(0), I think it's because there is only one document in my Corpus, so the document term matrix only have one column. You may want to test TermDocumentMatrix() and see if you have a multi-column matrix. That said, how do I find association within one document?.

这篇关于来自包 tm 的 findAssocs 出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

更多推荐

[db:关键词]

本文发布于:2023-04-30 19:53:27,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1398937.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:tm   findAssocs

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!