PolMine / topicanalysis

0 stars 1 forks source link

Adopt load.mallet.instances #9

Open ChristophLeonhardt opened 4 years ago

ChristophLeonhardt commented 4 years ago

mallet_instance_list_store adopts save.mallet.instances from the mallet R package. But the counterpart to load the instance_list again is missing and would be useful in the package itself:

load.mallet.instances <- function(filename) {
  rJava::J("cc.mallet.types.InstanceList")$load(rJava::.jnew("java/io/File", filename))
}

taken from: https://github.com/mimno/RMallet/blob/master/mallet/R/mallet.R