Set<List<Label>> plusStrings = buildSet(new String[][] { new String[]{"a","b"},new String[]{"c","b"} },config,converter), minusStrings = buildSet(new String[][] { new String[]{"a","u"} },config,converter);
m.createMarkovLearner(plusStrings, minusStrings,false);
final LearnerGraph graph = new LearnerGraph(config);graph.paths.augmentPTA(plusStrings, true, false);graph.paths.augmentPTA(minusStrings, false, false);
MarkovModel mOther = new MarkovModel(2,true,true);
new MarkovClassifier(mOther,graph).updateMarkov(false);
Assert.assertEquals(m.predictionsMatrix,mOther.predictionsMatrix);
// Workaround around a deficiency in the calculation of occurrences of prefixes by the PTA-based construction of Markov model.
Assert.assertEquals(new UpdatablePairInteger(2, 0), m.occurrenceMatrix.get(new Trace(Arrays.asList(new Label[]{lblA}),true)));
Assert.assertEquals(new UpdatablePairInteger(1, 0), mOther.occurrenceMatrix.get(new Trace(Arrays.asList(new Label[]{lblA}),true)));