input: 
  def classify_string(input_string: str, data: list, target: list) -> str:
      """ Categorizes an input string using a trained Naive Bayes classifier.
      The function takes an input string, extracts features from it, and uses
      a pre-trained Multinomial Naive Bayes classifier to predict its category.
      >>> classify_string('Hello, how are you?', data, target)
      'greeting'
      >>> classify_string('I want to buy a house', data, target)
      'inquiry'
      """
      from sklearn.naive_bayes import MultinomialNB
      from sklearn.feature_extraction.text import CountVectorizer
      
      # Feature extraction and transformation from string to numeric
      vectorizer = CountVectorizer()
      features = vectorizer.transform([input_string])
      
      # 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[0]
  
output:     # Extract the predicted category
      predicted_category = prediction[0]
      
      # Return the predicted category
      return predicted_category