ropenscilabs / tif

Text Interchange Formats
https://docs.ropensci.org/tif
35 stars 4 forks source link

Problem with `tif_is_tokens_df()` function #6

Closed lmullen closed 6 years ago

lmullen commented 6 years ago
library(tif)
library(magrittr)

tokens <- list(doc1 = c("aujourd'hui", "maman", "est", "morte"), doc2 = c("it", 
  "was", "a", "pleasure", "to", "burn"), doc3 = c("all", "this", "happened", 
  "more", "or", "less"))

tokens %>% tif_as_tokens_df() %>% tif_is_tokens_df()
#> [1] FALSE

I'd expect the output in the last line to be TRUE.

statsmaths commented 6 years ago

Good point. Was being caused by the name of the second column in tif_as_tokens_df, which we had gone back and forth on what it should be called. Fixed with 90fba02