refactorized PosTagger