class_docstr: An abstract class that wraps around the nltk.classify module.
  
  Expects that descendant classes include a class variable ``nltk_class``
  which is the class in the nltk.classify module to be wrapped.
  
  Example: ::
  
      class MyClassifier(NLTKClassifier):
          nltk_class = nltk.classify.svm.SvmClassifier
class_docstr_tok: ["An","abstract","class","that","wraps","around","the","nltk.classify","module",".","Expects","that","descendant","classes","include","a","class","variable","``","nltk_class","``","which","is","the","class","in","the","nltk.classify","module","to","be","wrapped",".","Example",":",":",":","class","MyClassifier","(","NLTKClassifier",")",":","nltk_class","=","nltk.classify.svm.SvmClassifier"]
docstr: Compute the accuracy on a test set.
  
  :param test_set: A list of tuples of the form ``(text, label)``, or a
      file pointer.
  :param format: If ``test_set`` is a filename, the file format, e.g.
      ``"csv"`` or ``"json"``. If ``None``, will attempt to detect the
      file format.
docstr_tok: ["Compute","the","accuracy","on","a","test","set",".",":","param","test_set",":","A","list","of","tuples","of","the","form","``","(","text",",","label",")","``",",","or","a","file","pointer",".",":","param","format",":","If","``","test_set","``","is","a","filename",",","the","file","format",",","e.g",".","``","``","csv","''","``","or","``","``","json","''","``",".","If","``","None","``",",","will","attempt","to","detect","the","file","format","."]
code: def accuracy(self, test_set, format=None):
      """Compute the accuracy on a test set.
  
      :param test_set: A list of tuples of the form ``(text, label)``, or a
          file pointer.
      :param format: If ``test_set`` is a filename, the file format, e.g.
          ``"csv"`` or ``"json"``. If ``None``, will attempt to detect the
          file format.
      """
      if is_filelike(test_set):
          test_data = self._read_data(test_set, format)
      else:  # test_set is a list of tuples
          test_data = test_set
      test_features = [
          (self.extract_features(d), c) for d, c in test_data
      ]
      return nltk.classify.accuracy(self.classifier, test_features)
  
imports: from __future__ import absolute_import
  from itertools import chain
  import nltk
  from textblob.compat import basestring
  from textblob.decorators import cached_property
  from textblob.exceptions import FormatError
  from textblob.tokenizers import word_tokenize
  from textblob.utils import strip_punc, is_filelike
  import textblob.formats
label_desc: Use image node_id 7 for calling the NLTKClassifier obj's underlying member method code with example usage: obj.accuracy(test_set, format) and returns: nltk