# Time calculation for NLTK tagging

I am trying to calculate the time required to tag one sentence/file by one trained NLTK HMM Tagger. To do this I am writing the following code, please suggest if I need to revise anything here.

import nltk
import time
#HMM
print f1
ls=len(sents)
print "Total No of Sentences:",ls
train_sents=sents[0:40]
test_sents=sents[41:46]
#TRAINING & TESTING
hmm_tagger=nltk.HiddenMarkovModelTagger.train(train_sents)
test=hmm_tagger.test(test_sents)