Word recognition and incremental learning based on neural associative memories and hidden Markov models