Learn R Programming

quanteda (version 0.7.2-1)

language: get or set the language of corpus documents

Description

Get or set the _language document-level metadata field in a corpus.

Usage

language(corp, drop = TRUE)

language(corp) <- value

Arguments

corp
a corpus object
drop
return as a vector if TRUE, otherwise return a data.frame
value
the new value for the language meta-data field, a string or character vector equal in length to ndoc(corp)

Details

This function modifies the _language value set by metadoc. It is a wrapper for metadoc(corp, "language").