Java Reference
In-Depth Information
1: ... loglikelihood=-254.98920096505964
0.14444444444444443
2: ... loglikelihood=-201.19283975630537 0.6
3: ... loglikelihood=-174.8849213436524
0.6111111111111112
4: ... loglikelihood=-157.58164262220754
0.6333333333333333
5: ... loglikelihood=-144.69272379986646
0.6555555555555556
...
99: ... loglikelihood=-33.461128002846024
0.9333333333333333
100: ... loglikelihood=-33.29073273669207
0.9333333333333333
To save the model to a file, we use the following code. The output stream is created and
the POSModel class' serialize method saves the model to the
en_pos_verne.bin file:
try (OutputStream modelOut = new BufferedOutputStream(
new FileOutputStream(new
File("en_pos_verne.bin")));) {
model.serialize(modelOut);
} catch (IOException e) {
// Handle exceptions
}
Search WWH ::




Custom Search