Turn a list of Expressions, Terms or Documents into a Collection

as.collection(list)

# S4 method for list
as.collection(list)

Arguments

x

list of which elements are objects that belong to the Expression, Term or Document classes of the sfutils package

Value

Object of class Collection

Examples

# NOT RUN {
# Get data
data("company_descriptions")

# Put text in a list
txt <- lapply(company_descriptions, function(x) x$desc)

# Fingerprint documents
txt_fp <- do_fingerprint_document(txt)

# To list
lst <- as.list(txt_fp)

# To collection
colcol <- as.collection(lst)
# }