meta

0th

Percentile

Metadata Management

Accessing and modifying metadata of text documents and corpora.

Usage
"meta"(x, tag = NULL, type = c("indexed", "corpus", "local"), ...) "meta"(x, tag, type = c("indexed", "corpus", "local"), ...) <- value "meta"(x, tag = NULL, type = c("indexed", "corpus", "local"), ...) "meta"(x, tag, type = c("indexed", "corpus", "local"), ...) <- value "meta"(x, tag = NULL, ...) "meta"(x, tag = NULL, ...) <- value "meta"(x, tag = NULL, ...) "meta"(x, tag = NULL, ...) <- value DublinCore(x, tag = NULL) DublinCore(x, tag) <- value
Arguments
x
For DublinCore a TextDocument, and for meta a TextDocument or a Corpus.
tag
a character giving the name of a metadatum. No tag corresponds to all available metadata.
type
a character specifying the kind of corpus metadata (see Details).
...
Not used.
value
replacement value.
Details

A corpus has two types of metadata. Corpus metadata ("corpus") contains corpus specific metadata in form of tag-value pairs. Document level metadata ("indexed") contains document specific metadata but is stored in the corpus as a data frame. Document level metadata is typically used for semantic reasons (e.g., classifications of documents form an own entity due to some high-level information like the range of possible values) or for performance reasons (single access instead of extracting metadata of each document). The latter can be seen as a from of indexing, hence the name "indexed". Document metadata ("local") are tag-value pairs directly stored locally at the individual documents.

DublinCore is a convenience wrapper to access and modify the metadata of a text document using the Simple Dublin Core schema (supporting the 15 metadata elements from the Dublin Core Metadata Element Set http://dublincore.org/documents/dces/).

References

Dublin Core Metadata Initiative. http://dublincore.org/

See Also

meta for metadata in package NLP.

Aliases
  • DublinCore
  • DublinCore<-
  • meta
  • meta.PCorpus
  • meta.VCorpus
  • meta<-.PCorpus
  • meta<-.VCorpus
  • meta.PlainTextDocument
  • meta<-.PlainTextDocument
  • meta.XMLTextDocument
  • meta<-.XMLTextDocument
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)
Documentation reproduced from package tm, version 0.6-2, License: GPL-3

Community examples

Looks like there are no examples yet.