def viterbi_decode_log_raw(self,seq): "Return only the prediction list and not a sequence" node_potentials,edge_potentials = self.build_potentials_log(seq) viterbi_path,_ = viterbi_log(node_potentials,edge_potentials) res = viterbi_path return res
def viterbi_decode_log(self,seq): node_potentials,edge_potentials = self.build_potentials_log(seq) viterbi_path,_ = viterbi_log(node_potentials,edge_potentials) res = viterbi_path new_seq = seq.update_from_sequence(res) return new_seq