#NEWLINE# def update( self , new_data , * args , **kwargs ) : #NEWLINE# #INDENT# 'Update the classifier with new training data and re-trains the\n        classifier.\n\n        :param new_data: New data as a list of tuples of the form\n            ``(text, label)``.\n        ' #NEWLINE# self . train_set += new_data #NEWLINE# self . train_features = [ ( self . extract_features ( d ) , c ) for ( d , c ) in self . train_set ] #NEWLINE# try : #NEWLINE# #INDENT# self . classifier = self . nltk_class . train ( self . train_features , * args , ** kwargs ) #NEWLINE# #UNINDENT# except AttributeError : #NEWLINE# #INDENT# raise ValueError ( 'NLTKClassifier must have a nltk_class variable that is not None.' ) #NEWLINE# #UNINDENT# return True