input: 
  from sklearn.naive_bayes import MultinomialNB
  
  def classify_string(input_string):
      """Given an input string, this function uses a Multinomial Naive Bayes classifier
      to categorize the string. The function performs feature extraction from the string,
      trains the classifier, and returns the predicted category.
      
      >>> classify_string("I love programming")
      ['Technology']
      >>> classify_string("The weather is beautiful today")
      ['Weather']
      """
      
      # Feature extraction and transformation from string to numeric
      features = . . .
  
      # Create an instance of the classifier 
      model = MultinomialNB()
  
      # Train the classifier on the data
      model.fit(data, target)
  
      # Make a prediction based on the input
      prediction = model.predict([features])
  
      # Return the prediction
      return prediction
  
output:     from sklearn.feature_extraction.text import CountVectorizer
      from sklearn.model_selection import train_test_split
      import numpy as np
  
      # Sample data for training
      data = ["I love programming", "The weather is beautiful today", "Machine learning is fascinating", "The sun is shining"]
      target = ["Technology", "Weather", "Technology", "Weather"]
  
      # Feature extraction and transformation from string to numeric
      vectorizer = CountVectorizer()
      features = vectorizer.fit_transform(data).toarray()
  
      # Create an instance of the classifier 
      model = MultinomialNB()
  
      # Train the classifier on the data
      model.fit(features, target)
  
      # Feature extraction for the input string
      input_features = vectorizer.transform([input_string]).toarray()
  
      # Make a prediction based on the input
      prediction = model.predict(input_features)
  
      # Return the prediction
      return prediction