I\'m trying to somehow compare a sole document\'s topic distribution (using LDA) with, other files and their topic distributions within a previously created topic model, usi
First, take a look at these:
Now, these examples show the basic functionality, but they don't show how to save and load the model if you need to separate training from testing. Basically what you need is to save both the model and the instances after training (since you need to train and test with the same pipeline), and load them before testing.
Save model and pipeline after training:
model.write(new File("model.dat"));
instances.save(new File("pipeline.dat"));
Load model and pipeline before testing:
ParallelTopicModel model = ParallelTopicModel.read(new File("model.dat"));
InstanceList instances = InstanceList.load(new File("pipeline.dat"));
Hope this helps.