Learn R Programming

textmining (version 0.0.1)

tmParsed: Function to create tmParsed

Description

Function to create tmParsed

Usage

tmParsed(x = NULL, package = "base", ...)

Arguments

x
source
package
package of reading the data could be tm or stylo
...
metadata for the tmParsed document

Value

returns tmParsed object

Examples

Run this code
corp <- tmCorpus(c("This is corp", "Document 2"))
parsed <- parse(corp)
parsed_ngram <- ngram(corp, k = 2)
parsed <- tmParsed(list(c("This", "is", "corp"), c("Document", "2")))
## Not run: 
# corp <- tmCorpus("directory", package = "stylo")
# parsed <- parse(corp)
# parsed_ngram <- ngram(corp, k = 2)
# parsed <- tmParsed(source = "directory", package = "stylo")
# ## End(Not run)

Run the code above in your browser using DataLab