Make sure to apply the standardize_func to all of your sentences. Also, ensure that the stopwords list and replacement action in your function are correct.
Hope it helps! Feel free to ask if you need further assistance.
I call the ‘standardize_func’ in from vectorizer.adapt(train_sentences, standardize_func) . Also, The result for test_sentence call to standardized_sentence = standardize_func(test_sentence) does not seem correct?