Function to access meta data for textmining objects

Description

Function to access meta data for textmining objects

Usage

1
getMeta(x, parameter, i = 1)

Arguments

x

textmining object tmCorpus or tmTextDocument

parameter

name of metadata to be extracted

i

index

Value

returns i-th document of corpus x

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
corp <- tmCorpus(c("This is first document", "This is second"))
getMeta(corp, parameter = "language", 1)
getMeta(corp, "title", 2)
meta(corp, "title")

text <- tmTextDocument("Text document")
getMeta(text, "language")
meta(text, "title")

parsed <- tmParsed(list(c("Parsed", "doc", "one"), c("Parsed", "two")))
getMeta(parsed, parameter = "title",  2)
meta(parsed, "title")