tests/testthat/test-special_tokens.R

test_that("tokens are length one character vectors", {
        expect_type(BOS(), typeof(character()))
        expect_length(BOS(), 1L)
        
        expect_type(EOS(), typeof(character()))
        expect_length(EOS(), 1L)
        
        expect_type(UNK(), typeof(character()))
        expect_length(UNK(), 1L)
})

Try the kgrams package in your browser

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

kgrams documentation built on April 4, 2025, 1:10 a.m.