In HMMs, the score function can be written as In perceptrons, on the other hand, it is given as where we explicitly distinguish the unigram feature function φ 1 k and bigram feature function φ 2 k .
comparing the form of the two functions, we can see that our discussion on HMMs can be extended to perceptrons by substituting implementing the perceptron algorithm is not straightforward.