* Refactor offline recognizer. The purpose is to make it easier to support different types of models.