tm_filter(tm)
tm_filter()所属R语言包:tm
Filter and Index Functions on Corpora
语料的过滤器和索引功能
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Interface to apply filter and index functions to corpora.
界面应用过滤器和索引功能语料库。
用法----------Usage----------
## S3 method for class 'Corpus'
tm_filter(x, ..., FUN = searchFullText,
doclevel = TRUE, useMeta = FALSE)
## S3 method for class 'Corpus'
tm_index(x, ..., FUN = searchFullText,
doclevel = TRUE, useMeta = FALSE)
参数----------Arguments----------
参数:x
A corpus.
的语料库。
参数:...
Arguments to FUN.
FUN的参数。
参数:FUN
A filter function returning a logical value.
一个过滤函数返回一个逻辑值。
参数:doclevel
Logical. If the document level flag is set FUN is applied to each element of x, otherwise FUN is applied to x itself. If FUN has an attribute doclevel its value will be automatically used.
逻辑。如果在文档级别标志被设置FUN被施加到每个元素x,否则FUN被施加到x本身。如果FUN有一个属性doclevel它的价值将被自动使用。
参数:useMeta
Logical. Should DMetaData be passed over to FUN as argument?
逻辑。如果DMetaData被传递到FUN作为参数?
值----------Value----------
tm_filter returns a corpus containing documents where FUN matches, whereas tm_index only returns the corresponding indices.
tm_filter返回的语料库包含文件FUN比赛,而tm_index返回相应的指数。
参见----------See Also----------
sFilter for a filter using a simple statement query language, and getFilters to list available filter and index functions.
sFilter过滤器使用简单的语句的查询语言,和getFilters列出可用的过滤器和索引功能。
实例----------Examples----------
data("crude")
attr(searchFullText, "doclevel")
tm_filter(crude, FUN = searchFullText, "company")
tm_index(crude, FUN = searchFullText, "company")
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|