input: Write a function to categorize user input using a machine learning classifier in Python. The function should use a MultinomialNB model for prediction. If the input string is empty, the function should return an empty string.
  
  def classify_string(input_string):
      if not input_string:
          return ""
      features = extract_features(input_string)
      model = MultinomialNB()
      model.fit(training_data, training_labels)
      prediction = model.predict([features])
      return prediction[0]
  
  assert classify_string("This is a test")=="test"
  assert classify_string("Machine learning is fascinating")=="Machine learning"
  assert classify_string("")==""
  assert classify_string("Python programming")=="Python"
output: def classify_string(input_string):
      if not input_string:
          return ""
      features = extract_features(input_string)
      model = MultinomialNB()
      model.fit(training_data, training_labels)
      prediction = model.predict([features])
      return prediction[0]