meta
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
aTextDocument
, and formeta
aTextDocument
or aCorpus
. - 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.
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)