algorithm - what's the greedy or dynamic programming approach for this? -


suppose making sentences using bi-gram, means probability of appearance of each word dependent on previous word. probability of sentence multiple of probability of words

p(sentence) = p(t0)*multiple i=1 i=n p(ti|ti-1) 

we have probability matrix can use determine p(ti|ti-1), want find probable sentence

is there greedy or dynamic programming approach it?

you can use viterbi algorithm. states words (t0, t2, t7, ...). initial state t0 , have matrix transition probabilities a_i,j = p(tj|ti), have no "observations", can not think p(y|k). every length (t) , every word (t_k) find v_t,k probability of probable sentence t words , word t_k @ sentence's end.


Comments

Popular posts from this blog

c++ - QTextObjectInterface with Qml TextEdit (QQuickTextEdit) -

javascript - angular ng-required radio button not toggling required off in firefox 33, OK in chrome -

xcode - Swift Playground - Files are not readable -