Building Data Science Software for NLP in R – UROP Symposium

Building Data Science Software for NLP in R

Shirlyn Dong

Research Mentor: Devin Judge-Lord
Mentor Department: Not Available, Public Policy
Author(s): Shirlyn Dong, Devin Judge-Lord
Session: Session 2 (10:00 AM – 10:50 AM)
Presentation Type: Poster 40

Abstract

Social science researchers often work with large sets of textual data and must extract specific information for analysis. For example, researchers studying policymaking may analyze congressional records to identify mentions of elected officials. Current tools rely heavily on automated classification methods, limiting research control. To address this issue, this project focused on developing Regextable, an R package that facilitates data extraction by providing user-defined expression lookup tables. The package Regextable allows users to provide both the input text and the pattern table to match, enabling efficient and targeted data extraction across different datasets. The core function, extract(), matches patterns to text entries and returns valid matches, along with optional metadata. Supporting functions include clean_text(), which standardizes text for consistent matching. Development relied on R’s regular expression engine, package documentation, testing workflows, and version control through GitHub. By enabling reproducible data extraction and identification, Regextable supports social science research such as legislative analysis and congressional speaker identification. Additionally, it addresses methodological concerns in social science research, specifically control, by enabling researchers to define explicit extraction rules through regular expression lookup tables. Overall, Regextable helps enhance research efficiency while supporting reproducibility in workflows.

lsa logoum logo