functions for POS tagging the corpus