Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

nsyllable.tokens

nsyllable methods for tokens


Description

Extends nsyllable() methods for tokens objects.

Usage

## S3 method for class 'tokens'
nsyllable(
  x,
  syllable_dictionary = nsyllable::data_syllables_en,
  use.names = FALSE
)

Arguments

x

character vector whose syllables will be counted. This will count all syllables in a character vector without regard to separating tokens, so it is recommended that x be individual terms.

syllable_dictionary

optional named integer vector of syllable counts where the names are lower case tokens. This can be used to override the language setting, when set to NULL (the default). If a syllable dictionary is supplied, this will override the language argument.

use.names

logical; if TRUE, assign the tokens as the names of the syllable count vector

Examples


quanteda.textstats

Textual Statistics for the Quantitative Analysis of Textual Data

v0.94.1
GPL-3
Authors
Kenneth Benoit [cre, aut, cph] (<https://orcid.org/0000-0002-0797-564X>), Kohei Watanabe [aut] (<https://orcid.org/0000-0001-6519-5265>), Haiyan Wang [aut] (<https://orcid.org/0000-0003-4992-4311>), Jiong Wei Lua [aut], Jouni Kuha [aut] (<https://orcid.org/0000-0002-1156-8465>), European Research Council [fnd] (ERC-2011-StG 283794-QUANTESS)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.