Investigating Large Language Models' Linguistic Abilities for Text Preprocessing
Braga, Milanese, Pasi
Text preprocessing is a fundamental component of Natural Language Processing, involving techniques such as stopword removal, stemming, and lemmatization to prepare text as input for further processing and analysis. Despite the context-dependent nature of the above techniques, traditional methods usually ignore contextual information. In this paper, we investigate the idea of using Large Language Models (LLMs) to perform various preprocessing tasks, due to their ability to take context into account without requiring extensive language-specific annotated resources. Through a comprehensive evaluation on web-sourced data, we compare LLM-based preprocessing (specifically stopword removal, lemmatization and stemming) to traditional algorithms across multiple text classification tasks in six European languages. Our analysis indicates that LLMs are capable of replicating traditional stopword removal, lemmatization, and stemming methods with accuracies reaching 97%, 82%, and 74%, respectively. Additionally, we show that ML algorithms trained on texts preprocessed by LLMs achieve an improvement of up to 6% with respect to the $F_1$ measure compared to traditional techniques. Our code, prompts, and results are publicly available at https://github.com/GianCarloMilanese/llm_pipeline_wi-iat.
텍스트 전처리는 자연언어처리의 기초 구성 요소로, 불용어 제거, 어간 추출 및 표제어 추출 등의 기법을 포함하며, 후속 처리 및 분석을 위해 텍스트 입력을 준비하는 데 사용됩니다. 이러한 기법들이 문맥 의존적임에도 불구하고, 전통적 방법들은 일반적으로 문맥 정보를 무시합니다. 본 논문은 대규모 언어 모델(LLMs)을 사용하여 다양한 전처리 작업을 수행하는 아이디어를 연구합니다. LLMs는 광범위한 언어별 주석 자원 없이도 문맥을 고려할 수 있기 때문입니다. 웹 데이터에 대한 포괄적인 평가를 통해, 6개 유럽 언어의 여러 텍스트 분류 작업에서 LLM 기반 전처리와 전통적 알고리즘을 비교했습니다. 분석 결과, LLMs는 전통적 불용어 제거, 표제어 추출 및 어간 추출 방법을 각각 97%, 82%, 74%의 정확도로 복제할 수 있음을 보여줍니다. 더욱이, LLM 전처리 텍스트로 훈련된 기계학습 알고리즘은 전통적 기법 대비 F1 지표에서 최대 6% 향상을 달성했습니다.
You specialize in removing stopwords from text. Stopwords are words that are not relevant for processing a text. [...] In this case, the relevant task is detecting the sentiment of a tweet (positive, negative or neutral). In this task, the word 'not' is often not considered a stopword, and it should be kept in the text.
표제어 추출 예시:
You specialize in text lemmatization. [...] Lemmatization depends on correctly identifying the intended part of speech and meaning of a word in a sentence, as well as within the larger context surrounding that sentence.
논문은 37개의 관련 문헌을 인용하며, LLMs, 텍스트 전처리, 정보 검색 및 다국어 NLP 등 주요 분야의 중요한 연구를 포함하여 연구에 견고한 이론적 기초를 제공합니다.
요약: 본 논문은 텍스트 전처리에서 LLMs의 응용을 개척적으로 탐색하며, 포괄적인 다국어 실험을 통해 문맥 인식 전처리에서 LLMs의 이점을 입증합니다. 높은 계산 비용 등의 한계가 있음에도 불구하고, 저자원 언어 및 문맥 민감 전처리 작업을 위한 가치 있는 솔루션을 제공합니다.