Skip to contents

Given a character vector, return a data.frame with lines text-mining metrics : values are related to each element of the vector provided by the user.

Usage

compute_nchar_metrics(text)

Arguments

text

character. A character vector of texts.

Value

A data.frame sorted in the same order as the character vector provided by the user, providing for each element of the vector :

n_char

character Number of characters - including spacing - in a line.

n_char_wo_space

character Number of characters - without spacing - in a line.

word_count_colname

character Number of words in a line.

vowel_count_colname

character Number of vowels in a line.

Examples

if (FALSE) { # \dontrun{
# Example 1: Construct a corpus from local folders
 text = c("the lazy lazy lazy rat terrier jump over the quick brown fox"
 , "cause lazy rat terrier are the best dog")
 compute_nchar_metrics(text)
} # }