input: Write a function to classify text documents into two classes: positive and negative. If the document is classified as positive, return the string "positive"; if negative, return the string "negative". Use the NaiveBayesClassifier from the nltk library for classification.
  
  def classify_text(text):
      positiveText = "This is a great movie!"
      negativeText = "This movie was terrible"
  
      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(text)))
  
  assert classify_text("This is a great movie!")=='positive'
  assert classify_text("This movie was terrible")=='negative'
  assert classify_text("This movie was ok")=='negative'
  assert classify_text("I loved it!")=='positive'
  assert classify_text("Couldn't be worse")=='negative'
output: def classify_text(text):
      positiveText = "This is a great movie!"
      negativeText = "This movie was terrible"
  
      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(text)))