text_to_syl: Converting Words to Syllables

Description Usage Arguments Details Value Note Author(s) Examples

Description

This function implements the function syl_split by providing support for vector or string input. It also has the option for multi-threading for better performance on a modern CPU.

Usage

1
2
3
4
text_to_syl(x,
            type=c("vector", "string"),
            multi_core=F,
            core_used=NA)

Arguments

x

A vector or a single string containing one or more words.

type

"vector" for vector input and "string" input

multi_core

a logical indicating whether to use multiple cores with parallel package

core_used

a numeric vector that specifies how many cores to use if "multi_core" is TRUE.

Details

This function is dependent upon the syl_split function and for better performance, the parallel package is required. In the future, the type argument may no longer be required as it will be handled by the function itself.

Value

A nested list with the syllables of the same word in their own lists

Note

Future support for Windows; May merge with syl_split in the future versions.

Author(s)

Kevin Wang

Examples

1
2
3
4
5
6
7
require(MeterOMeter)

text_to_syllable(c("I", "am", "a", "developer"), "vector")

text_to_syllable("I am a developer", "string")

text_to_syllable("I am a developer", "string", T, 2)

kevin931/MeterOMeter documentation built on Jan. 5, 2021, 12:12 p.m.