test_that("nsyllable.tokens works", {
toks <- quanteda::tokens("one ten twenty")
expect_equal(
nsyllable::nsyllable(toks),
list(text1 = c(1, 1, 2))
)
expect_equal(
nsyllable::nsyllable(quanteda::tokens_remove(toks, "ten", padding = TRUE)),
list(text1 = c(1, NA, 2))
)
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.