def clear_spelling_words()

in src/Backend/src/api/helpers/util.py [0:0]


def clear_spelling_words(sentence: list[str]) -> list[str]:
    articles = {"os", "as"}
    match check_spelling_or_syllables(sentence):
        case -1:
            return [word for word in sentence if len(word) > 1 and word not in articles]
        case _:
            return sentence