syllable (version 0.1.2)

lookup_syllable_counts: Lookup Syllable Counts

Description

A dictionary approach to determine syllable counts. The function searches a hash dictionary for a term and returns syllable counts. If the term is not found NA is returned.

Usage

lookup_syllable_counts(x, dictionary = syllable::syllable_counts_data)

Arguments

x
A character vector of terms.
dictionary
A data.table of terms and counts.

Value

Returns a vector of syllable counts.

Examples

Run this code
terms <- c("other", "about", "many", "into", "number", "people", "water",
    "over", "only", "little", "very", "after", "sentence", "before",
    "any", "follow", "also", "around", "another", "even", "because",
    "different", "picture", "again", "away", "animal", "letter",
    "mother", "answer", "study", "America")

stats::setNames(lookup_syllable_counts(terms), terms)

Run the code above in your browser using DataLab