meta(tm)
meta()所属R语言包:tm
Meta Data Management
元数据管理
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Methods to access and modify meta data of documents, corpora, and repositories. In addition to tm's internal meta data structures, Simple Dublin Core meta data mappings are available.
方法来访问和修改的文件,语料库和存储库的元数据。此外tm的内部元数据结构,简单的都柏林核心元数据映射。
用法----------Usage----------
## S3 method for class 'Corpus'
meta(x, tag, type = c("indexed", "corpus", "local"))
## S3 method for class 'TextDocument'
meta(x, tag, type = NULL)
## S3 method for class 'TextRepository'
meta(x, tag, type = NULL)
content_meta(x, tag) <- value
DublinCore(x, tag = NULL)
参数----------Arguments----------
参数:x
Either a text document, a corpus, or a text repository.
一个文本文件,文集,或文字资料库。
参数:tag
A character identifying the name of the meta datum.
一个字符识别的名称的元数据。
参数:type
A character specifying which meta data of a corpus should be considered.
一个字符指定的元数据的语料库,应考虑。
参数:value
Replacement value.
重置价值。
Details
详细信息----------Details----------
In general this function can be used to display meta information but also to modify individual meta data:
一般地,这功能可用于显示元信息,而且还能够修改个别的元数据:
x = "TextDocument", tag = NULL If no tag is given, this method pretty prints all x's meta data. If tag
所述如果没有tag=“TextDocument”,标签= NULL,这个方法相当打印出所有的“x的元数据。如果tag
x = "Corpus", tag = NULL, type = "indexed" This method investigates the type argument. type must be either indexed (default), local, or corpus. Former is a shortcut for accessing document level meta data (DMetaData) stored at the collection level (because it forms an own entity, or for performance reasons, i.e., a form of indexing, hence the name indexed), local accesses the meta data local to each text document (i.e., meta data in text documents' attributes), and corpus is a shortcut for corpus specific meta data (CMetaData). Depending whether a tag is set or not, all or only the meta data identified by the tag
X =“语料库”,标签= NULL类型=“索引”此方法调查type参数。 type是indexed(默认),local或corpus。前者是一个快捷方式访问文档元数据(DMetaData)存储在集合级别(因为它形成了自己的实体,或出于性能方面的考虑,即一个表的索引,因此索引),local每个文本文件(如文本文件的属性,元数据)的本地访问的元数据,并corpus是语料库特定的元数据(CMetaData)的快捷方式。根据标签是否已设置或全部或仅元数据的标签标识
x = "TextRepository", tag = NULL If no tag is given, this method pretty prints all x's meta data. If tag
X =的“TextRepository”,标签= NULL如果没有tag,这种方法相当打印所有x的元数据。如果tag
Simple Dublin Core meta data is only available locally at each document:
简单的都柏林核心元数据只在本地每个文件:
x = "TextDocument", tag = NULL Returns or sets the Simple Dublin Core meta datum named tag for x. tag must be a valid Simple Dublin Core element name (i.e, title, creator, subject, description, publisher, contributor, date, type, format, identifier, source, language, relation, coverage, or rights) or NULL. For the
X =“TextDocument”标签= NULL返回或设置简单的都柏林核心元数据命名为tagx。 tag必须是一个有效的简单的都柏林核心元素的名称(即标题,创作者,主题,描述,发行,来源,日期,类型,格式,标识,来源,语言,关系,覆盖范围,或权利)或 NULL。对于
content_meta is a convenience wrapper which calls Content if tag = "Content" and meta otherwise.
content_meta要求Content如果tag = "Content"和meta否则是一个方便的包装。
参考文献----------References----------
http://dublincore.org/
实例----------Examples----------
data("crude")
meta(crude[[1]])
DublinCore(crude[[1]])
meta(crude[[1]], tag = "Topics")
meta(crude[[1]], tag = "Comment") <- "A short comment."
meta(crude[[1]], tag = "Topics") <- NULL
DublinCore(crude[[1]], tag = "creator") <- "Ano Nymous"
DublinCore(crude[[1]], tag = "Format") <- "XML"
DublinCore(crude[[1]])
meta(crude[[1]])
meta(crude)
meta(crude, type = "corpus")
meta(crude, "labels") <- 21:40
meta(crude)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|