I am implementing the Maximum Entropy Markov Model (MEMM) algorithm by following Collins' notes: http://www.cs.columbia.edu/~mcollins/loglinear.pdf
The problematic term (see p. 18): $\ln\sum_y\exp(\vec v \cdot f(x^{(i)},y))$ (Although not explicitly mentioned, I'm assuming the natural logarithm is used, since Collins uses $e$ everywhere.)
I'm having problems because the dot product returns a high number which, when exponentiated, causes an arithmetic overflow. I would need to somehow rework the equation so that the numbers wouldn't be too high.
Any suggestions? Does this kind of thing has a name?
EDIT: The reasoning behind exponentiating the dot product is to produce positive numbers.