materialize {tm}R Documentation

Materialize Lazy Mappings

Description

The function tm_map supports so-called lazy mappings, that are mappings which are delayed until the documents' content is accessed. This function triggers the evaluation, i.e., it materializes the documents.

Usage

materialize(corpus, range = seq_along(corpus))

Arguments

corpus

A document collection with lazy mappings.

range

The indices of documents to be materialized.

Value

A corpus with materialized, i.e., all mappings computed and applied, documents for the requested range.

Author(s)

Ingo Feinerer

See Also

tm_map

Examples

data("crude")
x <- tm_map(crude, stemDocument, lazy = TRUE)
x <- materialize(x)

[Package tm version 0.5-10 Index]