首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >将lexisnexis输出导入R quanteda

将lexisnexis输出导入R quanteda
EN

Stack Overflow用户
提问于 2015-12-08 21:04:15
回答 1查看 579关注 0票数 2

我会使用Benoit的R软件包quanteda来分析从lexisnexis导出的文章。导出采用标准的html格式。我使用tm包+插件读取lexisnexis输出。不幸的是,当tm-语料库转换为quanteda语料库时会发生错误.这个功能坏了吗,还是我以前出了什么问题?

代码语言:javascript
复制
library("tm")
library("tm.plugin.lexisnexis")
library("quanteda")

ln <- LexisNexisSource("lexisnexisOutput.html")
cr <- Corpus(ln)
crp <- corpus(cr)

Error in UseMethod("corpus") : 
  no applicable method for 'corpus' applied to an object of class "list"
In addition: Warning message:
In corpus(texts, docvars = metad, source = paste("Converted from tm VCorpus '",  :
  Arguments docvarssource not used.
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2015-12-28 09:33:46

当文本是字符类型的向量时,这是corpus.VCorpus()的一个限制,而不仅仅是单个字符类型。固定在数量0.9.1-6。见关于GitHub的第80号问题

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/34165970

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档