2:- use_module(library(viterbi)). 3 4:- if(current_predicate(use_rendering/1)). 5:- use_rendering(c3). 6:- use_rendering(graphviz). 7:- use_rendering(table,[header(['Multivalued variable index','Rule index','Grounding substitution'])]). 8:- endif. 9 10:- viterbi. 11 12:- begin_lpad. 13 14win :- red, green. 15win :- blue, yellow. 16 170.4::red. 180.9::green. 190.5::blue. 200.6::yellow. 21 22 23:- end_lpad.
?-
viterbi(win,P,Exp)
. P=0.36 Exp=[rule(0, red, [red:0.4, '':0.6], [])
,rule(1, green, [green:0.9, '':0.09999999999999998], [])
]*/