syllable (version 0.1.2)

count_string: String Syllable Counts

Description

Syllable counts for the words in a single string.

Usage

count_string(x, ...)

Arguments

x
A character string.
...
ignored

Value

Returns a vector of integer counts.

See Also

Other syllable.functions: count_vector_by, count_vector, 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
count_string("I like chicken and eggs for breakfast")
count_string(hamlets_soliloquy)
library(stringi)

data.frame(
    word = stri_extract_all_words(stri_trans_tolower(hamlets_soliloquy))[[1]],
    syllables = count_string(hamlets_soliloquy)
)

Run the code above in your browser using DataLab