input: Write a function to classify text documents into two classes: positive and negative using a NaiveBayesClassifier from the nltk library. The function should return the classification result for a given text.
  assert classifier.classify(label_words(nltk.word_tokenize("This is a great movie!")))=='positive'
  assert classifier.classify(label_words(nltk.word_tokenize("This movie was terrible")))=='negative'
  assert classifier.classify(label_words(nltk.word_tokenize("This movie was ok")))=='positive'
  assert classifier.classify(label_words(nltk.word_tokenize("This film is amazing")))=='positive'
  assert classifier.classify(label_words(nltk.word_tokenize("I didn't like this movie")))=='negative'
output: def classify_text(text):
      from nltk.classify import NaiveBayesClassifier
      from nltk.tokenize import word_tokenize
  
      def label_words(words):
          return dict([(word, True) for word in words])
  
      positive_features = [
          (label_words(word_tokenize("This is a great movie!")), 'positive'),
          (label_words(word_tokenize("This movie was ok")), 'positive'),
          (label_words(word_tokenize("This film is amazing")), 'positive')
      ]
  
      negative_features = [
          (label_words(word_tokenize("This movie was terrible")), 'negative'),
          (label_words(word_tokenize("I didn't like this movie")), 'negative')
      ]
  
      train_set = positive_features + negative_features
      classifier = NaiveBayesClassifier.train(train_set)
  
      return classifier.classify(label_words(word_tokenize(text)))