class_docstr: A classifier based on the Naive Bayes algorithm, as implemented in
  NLTK.
  
  :param train_set: The training set, either a list of tuples of the form
      ``(text, classification)`` or a filename. ``text`` may be either
      a string or an iterable.
  :param feature_extractor: A feature extractor function that takes one or
      two arguments: ``document`` and ``train_set``.
  :param format: If ``train_set`` is a filename, the file format, e.g.
      ``"csv"`` or ``"json"``. If ``None``, will attempt to detect the
      file format.
  
  .. versionadded:: 0.6.0
class_docstr_tok: ["A","classifier","based","on","the","Naive","Bayes","algorithm",",","as","implemented","in","NLTK",".",":","param","train_set",":","The","training","set",",","either","a","list","of","tuples","of","the","form","``","(","text",",","classification",")","``","or","a","filename",".","``","text","``","may","be","either","a","string","or","an","iterable",".",":","param","feature_extractor",":","A","feature","extractor","function","that","takes","one","or","two","arguments",":","``","document","``","and","``","train_set","``",".",":","param","format",":","If","``","train_set","``","is","a","filename",",","the","file","format",",","e.g",".","``","``","csv","''","``","or","``","``","json","''","``",".","If","``","None","``",",","will","attempt","to","detect","the","file","format",".","..","versionadded",":",":","0.6.0"]
docstr: Return the label probability distribution for classifying a string
  of text.
  
  Example:
  ::
  
      >>> classifier = NaiveBayesClassifier(train_data)
      >>> prob_dist = classifier.prob_classify("I feel happy this morning.")
      >>> prob_dist.max()
      'positive'
      >>> prob_dist.prob("positive")
      0.7
  
  :rtype: nltk.probability.DictionaryProbDist
docstr_tok: ["Return","the","label","probability","distribution","for","classifying","a","string","of","text",".","Example",":",":",":",">",">",">","classifier","=","NaiveBayesClassifier","(","train_data",")",">",">",">","prob_dist","=","classifier.prob_classify","(","``","I","feel","happy","this","morning",".","''",")",">",">",">","prob_dist.max","(",")","'positive'",">",">",">","prob_dist.prob","(","``","positive","''",")","0.7",":","rtype",":","nltk.probability.DictionaryProbDist"]
code: def prob_classify(self, text):
      """Return the label probability distribution for classifying a string
      of text.
  
      Example:
      ::
  
          >>> classifier = NaiveBayesClassifier(train_data)
          >>> prob_dist = classifier.prob_classify("I feel happy this morning.")
          >>> prob_dist.max()
          'positive'
          >>> prob_dist.prob("positive")
          0.7
  
      :rtype: nltk.probability.DictionaryProbDist
      """
      text_features = self.extract_features(text)
      return self.classifier.prob_classify(text_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 1 for calling the NaiveBayesClassifier obj's underlying member method code with example usage: obj.prob_classify(text) and returns: self