input: Write a function to classify text documents into two classes: positive and negative. The function should train a NaiveBayesClassifier using the provided training data and then classify a given text. If given an empty string, the function should return 'neutral'.
  
  def classify_sentiment(text):
      import nltk
      from nltk.classify import NaiveBayesClassifier
      
      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) 
      
      if text == "":
          return 'neutral'
      
      return classifier.classify(label_words(nltk.word_tokenize(text)))
  
  assert classify_sentiment("This movie was ok") == 'positive'
  assert classify_sentiment("I hated this film") == 'negative'
  assert classify_sentiment("") == 'neutral'
  assert classify_sentiment("This is an amazing movie!") == 'positive'
  assert classify_sentiment("This movie was terrible") == 'negative'
output: def classify_sentiment(text):
      import nltk
      from nltk.classify import NaiveBayesClassifier
      
      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) 
      
      if text == "":
          return 'neutral'
      
      return classifier.classify(label_words(nltk.word_tokenize(text)))