Text this: A new algorithm to train hidden Markov models for biological sequences with partial labels