koheiw / seededlda

LDA for semisupervised topic modeling
https://koheiw.github.io/seededlda/
73 stars 16 forks source link

seededlda:::tfm errors if there is x in docvars #87

Open koheiw opened 3 weeks ago

koheiw commented 3 weeks ago
> require(quanteda)
> dict <- dictionary(list('A' = "a"))
> dat <- data.frame(text = c("a b c", "A B C"), x = c(1, 2))
> corp <- corpus(dat)
> toks <- tokens(corp)
> dfmt <- dfm(toks)
> seededlda:::tfm(dfmt, dict)
Error: ndoc() only works on corpus, dfm, spacyr_parsed, tokens, tokens_xptr objects.