使用
pos_tag_sents用于标记多个句子:
>>> import time>>> from nltk.corpus import brown>>> from nltk import pos_tag>>> from nltk import pos_tag_sents>>> sents = brown.sents()[:10]>>> start = time.time(); pos_tag(sents[0]); print time.time() - start0.934092998505>>> start = time.time(); [pos_tag(s) for s in sents]; print time.time() - start9.5061340332>>> start = time.time(); pos_tag_sents(sents); print time.time() - start 0.939551115036



