tests/testthat/test-unnest_ptb.R

test_that("unnest_ptb works", {
  d <- tibble(txt = janeaustenr::prideprejudice)
  r <- unnest_ptb(d, out, txt)
  s <- unnest_tokens(d, out, txt, token = "ptb")
  expect_equal(r, s)
  r <- unnest_ptb(skspr, out, txt)
  s <- unnest_tokens(skspr, out, txt, token = "ptb")
  expect_equal(r, s)
})

Try the tidytext package in your browser

Any scripts or data that you put into this service are public.

tidytext documentation built on May 29, 2024, 5:42 a.m.