You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tried to execute the provided example for the as.VCorpus method using GermaParlMini after failing on the GermaParl Corpus.
P <- partition("GERMAPARLMINI", date = "2009-11-10")
... get encoding: latin1
... get cpos and strucs
> PB <- partition_bundle(P, s_attribute = "speaker")
... getting values for s-attribute speaker
... number of partitions to be generated: 37
> VC <- as.VCorpus(PB)
Error in UseMethod("as.VCorpus") :
no applicable method for 'as.VCorpus' applied to an object of class "c('partition_bundle', 'count_bundle', 'bundle')"
The text was updated successfully, but these errors were encountered:
Thanks for raising the issue. The error you report only occurrs, if the the tm-package has been loaded prior to executing the code. So if you execute the code without having loading tm, everything is fine.
This is obviously nasty. To have a solution that will always work, the new development version of polmineR includes a coerce-method that can be used by calling as(YOUROBJECT, "VCorpus"). The as.VCorpus()-method still exists, but it simply hands over the partition_bundle` to the coerce-method.
Just one note: If you use tm to generate a DocumentTermMatrix, it is really highly inefficient to reconstruct the full text using as.VCorpus first. Using the as.DocumentTermMatrix()-method, or as.TermDocumentMatrix() included in the polmineR package is the approach I recommend.
Tried to execute the provided example for the as.VCorpus method using GermaParlMini after failing on the GermaParl Corpus.
The text was updated successfully, but these errors were encountered: