def clean_text_by_sentences ( text , language = "english" , additional_stopwords = None ) : init_textcleanner ( language , additional_stopwords ) original_sentences = split_sentences ( text ) filtered_sentences = filter_words ( original_sentences ) return merge_syntactic_units ( original_sentences , filtered_sentences )
python wordnet lemmatizer not workinf
Tokenizes a given text into sentences applying filters and lemmatizing them . Returns a SyntacticUnit list .
def clean_text_by_sentences(text, language="english", additional_stopwords=None):
    """ Tokenizes a given text into sentences, applying filters and lemmatizing them.
    Returns a SyntacticUnit list. """
    init_textcleanner(language, additional_stopwords)
    original_sentences = split_sentences(text)
    filtered_sentences = filter_words(original_sentences)

    return merge_syntactic_units(original_sentences, filtered_sentences)