Learn R Programming

textmining (version 0.0.1)

getMeta: Function to access meta data for textmining objects

Description

Function to access meta data for textmining objects

Usage

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

Run this code
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")

Run the code above in your browser using DataLab