spaCy is a Python library used here for lemmatization: reducing words to their base forms before keyword matching. This can make searches more consistent, but cleaning choices still depend on the dataset and task. section 5.5.5
Lemmatizing Portuguese reviews
Load the Portuguese model, process each review, collect token lemmas, and store the normalized text before searching keywords: nlp = spacy.load("pt_core_news_sm"); doc = nlp(text); lemmatized_words = [token.lemma_ for token in doc]. Inspect the resulting matches rather than assuming preprocessing improves every measure. section 5.5.5
Dedicated libraries can provide more consistent and scalable text analysis than generative AI, especially for specialized vocabulary, ambiguous language, and repeatable detection tasks. section 5.1.3




