input: Write a function to classify text documents into two classes: positive and negative using Naive Bayes classification. The function should tokenize the input text, label the words, train a classifier using the labeled data, and then classify the given test text.
  
  
  def text_classifier(positiveText, negativeText, testText):
      import nltk
      from nltk.classify import NaiveBayesClassifier
      
      def label_words(words):
          return dict([(word, True) for word in words])
      
      positive_tokens = nltk.word_tokenize(positiveText)
      negative_tokens = nltk.word_tokenize(negativeText)
      
      positive_data = [(label_words(positive_tokens), 'positive')]
      negative_data = [(label_words(negative_tokens), 'negative')]
      
      train_data = positive_data + negative_data
      classifier = NaiveBayesClassifier.train(train_data)
      
      return classifier.classify(label_words(nltk.word_tokenize(testText)))
  
  # Test cases
  assert text_classifier("This is a great movie!", "This movie was terrible", "This is a wonderful movie!") == 'positive'
  assert text_classifier("This is a great movie!", "This movie was terrible", "This movie was not enjoyable") == 'negative'
  assert text_classifier("This is a great movie!", "This movie was terrible", "This movie was ok") == 'positive'
  assert text_classifier("This is a great movie!", "This movie was terrible", "The acting was poor and the plot was weak") == 'negative'
  assert text_classifier("This is a great movie!", "This movie was terrible", "I loved every minute of it!") == 'positive'
  
output: def text_classifier(positiveText, negativeText, testText):
      import nltk
      from nltk.classify import NaiveBayesClassifier
      
      def label_words(words):
          return dict([(word, True) for word in words])
      
      positive_tokens = nltk.word_tokenize(positiveText)
      negative_tokens = nltk.word_tokenize(negativeText)
      
      positive_data = [(label_words(positive_tokens), 'positive')]
      negative_data = [(label_words(negative_tokens), 'negative')]
      
      train_data = positive_data + negative_data
      classifier = NaiveBayesClassifier.train(train_data)
      
      return classifier.classify(label_words(nltk.word_tokenize(testText)))