def METHOD_NAME(data: pd.Series, tfidf=False, **kwargs):
    from sklearn.feature_extraction.text import TfidfVectorizer, CountVectorizer
    from .stop_words import sw_en, sw_fr
    raw_stopwords = sw_en + sw_fr
    vectorizer = TfidfVectorizer(**kwargs) if tfidf else CountVectorizer(**kwargs)
    tokenizer = vectorizer.build_tokenizer()
    tokenized_stopwords = sum([tokenizer(stop_word) for stop_word in raw_stopwords], [])
    vectorizer.set_params(stop_words=tokenized_stopwords)
    try:
        vectorizer.fit(data)
    except ValueError as err:
        raise VectorizerError(str(err)) from err
    return vectorizer