gpt4 book ai didi

R文本挖掘包: Allowing to incorporate new documents into an existing corpus

转载 作者:行者123 更新时间:2023-12-02 20:47:22 26 4
gpt4 key购买 nike

我想知道 R 的文本挖掘包是否有可能具有以下功能:

myCorpus <- Corpus(DirSource(<directory-contatining-textfiles>),control=...)
# add docs
myCorpus.addDocs(DirSource(<new-dir>),control=...)

理想情况下,我希望将其他文档合并到现有语料库中。

感谢任何帮助

最佳答案

您应该能够像

中那样使用 c(,)
> library(tm)
> data("acq")
> data("crude")
> together <- c(acq,crude)
> acq
A corpus with 50 text documents
> crude
A corpus with 20 text documents
> together
A corpus with 70 text documents

您可以在 tm package documentation 中找到更多信息在tm_combine下。

关于R文本挖掘包: Allowing to incorporate new documents into an existing corpus,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6616805/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com