lookup_syllable_counts: Lookup Syllable Counts

Description Usage Arguments Value Examples

View source: R/lookup_syllable_counts.R

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

1

Arguments

x

A character vector of terms.

dictionary

A data.table of terms and counts.

Value

Returns a vector of syllable counts.

Examples

1
2
3
4
5
6
7
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)

syllable documentation built on May 30, 2017, 12:52 a.m.