【发布时间】:2025-11-28 22:00:02
【问题描述】:
运行以下脚本将产生结果
a <- c("Your work is going to fill a large part of your life, and the only way to be truly satisfied is to do what you believe is great work. And the only way to do great work is to love what you do. If you haven't found it yet, keep looking. Don't settle. As with all matters of the heart, you'll know when you find it. - Steve Jobs")
a_source <- VectorSource(a)
a_corpus <- VCorpus(a_source)
term_stats(a_corpus)
term_stats(a_corpus)
term count support
1 . 5 1
2 to 5 1
3 is 4 1
4 you 4 1
5 , 3 1
【问题讨论】:
-
一位同事帮助理解了它。 rdocumentation.org/packages/corpus/versions/0.9.4/topics/… 。例如,如果有 5 个观察值并且单词“to”出现在三个观察值中,则 support 给出包含单词“to”的观察值的数量。在我们的案例中,支持将是 3.