syllable (version 0.1.2)

count_vector: Vector Syllable Counts

Description

Syllable counts for the words in a vector of strings.

Usage

count_vector(x, ...)

Arguments

x
A character vector.
...
ignored.

Value

Returns a list of vectors of integer counts.

See Also

Other syllable.functions: count_string, count_vector_by, sum_string, sum_vector_by, sum_vector, tally_both_string, tally_both_vector_by, tally_both_vector, tally_di_string, tally_di_vector_by, tally_di_vector, tally_mono_string, tally_mono_vector_by, tally_mono_vector, tally_poly_string, tally_poly_vector_by, tally_poly_vector, tally_short_string, tally_short_vector_by, tally_short_vector

Examples

Run this code
sents <- c("I like chicken.", "I want eggs Benedict for breakfast.")
count_vector(sents)

Map(function(x, y) setNames(x, y),
   count_vector(sents),
   strsplit(gsub("[^a-z ]", "", tolower(sents)), "\\s+")
)

count_vector(presidential_debates_2012$dialogue)

Run the code above in your browser using DataLab