Closed leungi closed 4 years ago
Please consult with ?Collocations
. You need first to train model and then you can use transform
method. But thanks for reporting - we need produce more meaningful error when transform
method called prior to fit
method.
Apologies @dselivanov; I should've been more careful to realize that it's impossible to do anything without a fit
object 😅
If you may, I can do a PR to edit the docs; am I correct to assume this is where I should be appending the error message to: https://github.com/dselivanov/text2vec/blob/13d0b0349051917bbbbe6a9c2ad3fbe1dd598b9e/R/model_Collocations.R#L242
Would really appreciate if you can send PR which adds code to check whether model was fitted.
Reprex below; tested on R 3.6.2 (Windows) and 3.5.1 (RHEL7), with same outcome.