TextRegress: A Python package for advanced regression analysis on long-form text data
TextRegress is an open-source Python package that leverages state-of-the-art deep learning techniques to perform regression analysis on long-form text data. Departing from conventional text mining tools that are confined to classification, sentiment, or readability metrics, TextRegress provides a unified framework for conducting predictive modeling of continuous outcomes. By integrating advanced encoding methods—including transformer-based embeddings, TF-IDF, and pre-trained Hugging Face models—with a robust PyTorch Lightning backend, TextRegress efficiently processes long texts through automatic chunking and dynamic feature integration. Its flexible architecture and customizable training paradigms empower researchers and practitioners across diverse domains to deploy sophisticated regression models, fostering reproducibility and accelerating innovation in text analytics. • Unified DataFrame Interface & Scikit-Learn Inspired API. • Combines transformer-based embeddings, TFIDF, and customizable Hugging Face models to capture rich semantic information from long-form text. • Utilizes a PyTorch Lightning–based framework with configurable RNN layers (LSTM/GRU) and optional attention mechanisms to model complex text relationships. • Offers fine-grained control over training parameters and seamless incorporation of exogenous features, enhancing model adaptability and reproducibility.
Authors
- Weiyao Peng
- Jinhang Jiang (ORCID: https://orcid.org/0000-0002-3941-5161)
- Ben Liu (ORCID: https://orcid.org/0000-0001-8452-5397)
- Karthik Srinivasan (ORCID: https://orcid.org/0000-0002-1608-6190)
Institutions
- McKesson (United States) (US)
- University of Kansas (US)
Publication Details
- Journal
- Software Impacts
- Published
- 2025-05-05
- DOI
- https://doi.org/10.1016/j.simpa.2025.100760
- Primary Topic
- Computational Physics and Python Applications
- Type
- article
- Field-Weighted Citation Impact
- 0.00