Questions tagged [viterbi]

The Viterbi algorithm is a dynamic programming algorithm for finding the most likely sequence of hidden states—called the Viterbi path—that results in a sequence of observed events, especially in the context of Markov information sources and hidden Markov models. Use this tag for questions about this algorithm.

The Viterbi algorithm is a dynamic programming algorithm for finding the most likely sequence of hidden states—called the Viterbi path—that results in a sequence of observed events, especially in the context of Markov information sources and hidden Markov models.

The algorithm has found universal application in decoding the convolutional codes used in both CDMA and GSM digital cellular, dial-up modems, satellite, deep-space communications, and 802.11 wireless LANs. It is now also commonly used in speech recognition, speech synthesis, diarization,1 keyword spotting, computational linguistics, and bioinformatics. For example, in speech-to-text (speech recognition), the acoustic signal is treated as the observed sequence of events, and a string of text is considered to be the "hidden cause" of the acoustic signal. The Viterbi algorithm finds the most likely string of text given the acoustic signal. (src: Wikipedia)

84 questions
2
votes
2 answers

Need help understanding this Python Viterbi algorithm

I'm trying to convert a Python implementation of the Viterbi algorithm found in this Stack Overflow answer into Ruby. The full script can be found at the bottom of this question with my comments. Unfortunately I know very little about Python so the…
David Tuite
  • 22,258
  • 25
  • 106
  • 176
1
vote
0 answers

Viterbi algorithm, unhardcode for general case Java

my task is to find the most probable sequences of words in a sentence using viterbi algorithm. The given sequence of states is here: I have to introduce initial probabilities and transition probabilities and then print the most likely sequence of…
Vladimir Stazhilov
  • 1,956
  • 4
  • 31
  • 63
1
vote
1 answer

Why does Viterbi algorithm (POS tagging) always predict one tag?

Here is my HMM model class: class HiddenMarkovModel: def __init__(self): pass def fit(self, train_tokens_tags_list): """ train_tokens_tags_list: array of sentences of pairs word-tag (for train) …
ALiCe P.
  • 231
  • 1
  • 10
1
vote
1 answer

Viterbi algorithm without fitting a HMM model, python

I have a set of observation and states that I determined. I'm trying to associate the observations to the states but the hmmlearn library will only decode the observation after fitting the HMM to the observation. The fitting changes the states which…
tal
  • 21
  • 3
1
vote
1 answer

Log probability in the Viterbi algorithm (handling zero probabilities)

I am coding a probabilistic part of speech tagger in Python using the Viterbi algorithm. In this context, the Viterbi probability at time t is the product of the Viterbi path probability from the previous time step t-1, the transition probability…
1
vote
0 answers

Matlab's viterbi algorithm implementation in vitdec() function

I'm working on convolutional coding and decoding. In MATLAB, I'm using vitdec() function for decoding. Results are fine and bit error rate is as expected but I want to dig deeper into this function and I was doing it well until I hit vit() function…
Sumbul
  • 167
  • 1
  • 8
1
vote
1 answer

How to determine length of observation sequence for HMM in speech recognition

I'm re-learning how to use Hidden Markov Models for speech recognition and I have a question. It seems that most/all discussions of using HMM's consider the case of a known sequence of observation: [O1, O2, O3,...,OT] where T is a known number.…
1
vote
0 answers

How to create specific Viterbi Algorithm in Python for Homework?

So Basically for this homework, we're trying to use the Viterbi Algorithm to solve a hidden Markov model, I tried to base mine on others I found online but upon getting a hint from the teacher I'm overthinking it. I'm really good at the mathematical…
1
vote
0 answers

Convolution decoding using viterbi algorithm in unetstack

I have tried to implement convolution decoding using Viterbi algorithm in unetstack. However, there are some issues that I am facing. The data is not getting sent to node 2. (arr - line 43 of MulAgent.groovy ) In some cases getting an…
abha
  • 11
  • 1
1
vote
1 answer

Algorithm - finding the order of HMM from observations

I am given a data that consists of N sequences of variable lengths of hidden variables and their corresponding observed variables (i.e., I have both the hidden variables and the observed variables for each sequence). Is there a way to find the order…
user1767774
  • 1,775
  • 3
  • 24
  • 32
1
vote
2 answers

How to understand the 'viterbi_decode' in tensorflow

The traditional viterbi algorithm using in HMM has a start probability matrix(viterbi algorithm wiki), but the params of viterbi_decode in tensorflow only need transition probability matrix and emission probability matrix. How to understand…
yanwii
  • 170
  • 2
  • 12
1
vote
1 answer

ViterbiParser and ChartParser returning None for PCFG in NLTK

I'm trying to use ViterbiParser and ChartParser to parse the sentence "Birds fly." Tracing the process, it seems like it should be working, but always returns None Here are the traces. (Viterbi): Inserting tokens into the most likely constituents…
user1209675
  • 296
  • 7
  • 18
1
vote
0 answers

Which tagset to use for training a POS tagger?

I'm designing a simple POS tagger using the Viterbi algorithm and a Trigram language model. How do I decide which tagset to use for training? (POS tagger for English)
Vishnu Dasu
  • 533
  • 5
  • 18
1
vote
1 answer

What is the difference between Viterbi CYK and Probabilistic CYK algorithm, Is there any differences?

I think they are the same concept, https://courses.engr.illinois.edu/cs498jh/Slides/Lecture10.pdf Probabilistic CYK algorithm is used the viterbi algorithm to parse, is my concept is correct?
1
vote
1 answer

Trying to understand the VITERBI algorithm a bit better

I'm currently trying to implement the viterbi algorithm in python, more specifically the version presented in an online course. As it stands, the algorithm is presented that way: given a sentence with K tokens, we have to generate K tags . We…
omu_negru
  • 4,642
  • 4
  • 27
  • 38