找回密码
 注册
查看: 1325|回复: 0

R语言 tm包 tm_map()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-10-1 10:55:04 | 显示全部楼层 |阅读模式
tm_map(tm)
tm_map()所属R语言包:tm

                                        Transformations on Corpora
                                         语料的转变

                                         译者:生物统计家园网 机器人LoveR

描述----------Description----------

Interface to apply transformation functions (also denoted as mappings) to corpora.
界面应用转换功能(也表示,映射)语料库。


用法----------Usage----------


## S3 method for class 'PCorpus'
tm_map(x, FUN, ..., useMeta = FALSE, lazy = FALSE)
## S3 method for class 'VCorpus'
tm_map(x, FUN, ..., useMeta = FALSE, lazy = FALSE)



参数----------Arguments----------

参数:x
A corpus.
的语料库。


参数:FUN
A transformation function returning a text document.
一个变换函数返回一个文本文件。


参数:...
Arguments to FUN.
FUN的参数。


参数:useMeta
Logical. Should DMetaData be passed over to FUN as argument?
逻辑。如果DMetaData被传递到FUN作为参数?


参数:lazy
Logical. Lazy mappings are mappings which are delayed until the documents' content is accessed. Lazy mapping is useful when working with large corpora but only few documents will be accessed, as it avoids the computationally expensive application of the mapping to all elements in the corpus.
逻辑。懒惰的映射是被延迟,直到该文件的内容被访问的映射。懒惰的映射是非常有用的工作时,与大型语料库,但只有少数几个将要访问的文件,因为它避免了昂贵的应用程序的映射计算的语料中的所有元素。


值----------Value----------

A corpus with FUN applied to each document in x. In case of lazy mappings only annotations are stored which are evaluated upon access of individual documents which trigger the execution of the corresponding transformation function.
FUN的语料库中的每个文档x。在慵懒的映射的情况下,仅注释存储在访问个人文件触发执行相应的转换功能进行评估。


注意----------Note----------

Please be aware that lazy transformations are an experimental feature and change R's standard evaluation semantics.
请知道懒惰的转换是一个实验性的功能,改变R的标准评价语义。


参见----------See Also----------

getTransformations for available transformations, and materialize for manually triggering the materialization of documents with pending lazy transformations.
getTransformations可用的转换,和materialize,手动触发暂挂的延迟转换的物化文件。


实例----------Examples----------


data("crude")
tm_map(crude, stemDocument)
## Generate a custom transformation function which takes the heading[#生成自定义转换函数,它接受的标题]
## as new content[#新的内容]
headings <- function(x)
    PlainTextDocument(Heading(x), id = ID(x), language = Language(x))
inspect(tm_map(crude, headings))

转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。


注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|生物统计家园 网站价格

GMT+8, 2025-6-18 16:43 , Processed in 0.020960 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表