Suppose I have a string like 'meetateight' and I need to segment it into meaningful words like 'meet' 'at' 'eight' using dynamic programming.
To judge how “good” a block/segment "x = x1x2x3" is, I am given a black box that, on input x, returns a real number quality(x) such that: A large positive value for quality(x) indicates x is close to an English word, and a large negative number indicates x is far from an English word.
I need help with designing an algorithm for the same.
I tried thinking over an algorithm in which I would iteratively add letters based on their quality and segment whenever there is a dip in quality. But this fails in the above example because it cuts out me instead of meet.
I need suggestions for a better algorithm.
Thanks