def clean_text_by_word(text, language="english"):
    init_textcleanner(language)
    text_without_acronyms = replace_with_separator(text, "", [AB_ACRONYM_LETTERS])
    original_words = list(tokenize(text_without_acronyms, to_lower=True, deacc=True))
    filtered_words = filter_words(original_words)
    if HAS_PATTERN:
        tags = tag(" ".join(original_words)) # tag needs the context of the words in the text
    else:
        tags = None
    units = merge_syntactic_units(original_words, filtered_words, tags)
    return { unit.text : unit for unit in units }
Setting the timeout to C{None} cancel any timeout operations.
dataset/ETHPy150Open summanlp/textrank/summa/preprocessing/textcleaner.py/clean_text_by_word--crossover with--dataset/ETHPy150Open nlloyd/SubliminalCollaborator/libs/twisted/test/test_policies.py/TestTimeout.test_cancelTimeout