'Train the CRF tagger using CRFSuite
:params train_data : is the list of annotated sentences.
:type train_data : list (list(tuple(str,str)))
:params model_file : the model will be saved to this file.'

def train(self, train_data, model_file):

    trainer = pycrfsuite.Trainer(verbose=self._verbose)
    trainer.set_params(self._training_options)
    for sent in train_data:
        (tokens, labels) = zip(*sent)
        features = [self._feature_func(tokens, i) for i in range(len(tokens))]
        trainer.append(features, labels)
    trainer.train(model_file)
    self.set_model_file(model_file)
