#NEWLINE# def train( self , labeled_featuresets ) : #NEWLINE# #INDENT# '\n        Train (fit) the scikit-learn estimator.\n\n        :param labeled_featuresets: A list of ``(featureset, label)``\n            where each ``featureset`` is a dict mapping strings to either\n            numbers, booleans or strings.\n        ' #NEWLINE# ( X , y ) = list ( compat . izip ( * labeled_featuresets ) ) #NEWLINE# X = self . _vectorizer . fit_transform ( X ) #NEWLINE# y = self . _encoder . fit_transform ( y ) #NEWLINE# self . _clf . fit ( X , y ) #NEWLINE# return self