# FrutosDigital – TEI Transformation Pipeline

## Overview

This repository contains a reproducible computational workflow developed in Google Colab for the transformation of TEI-encoded textual structures. The script converts poetic segmentation encoded as `<lg>` (line group) and `<l>` (line) into prose paragraphs `<p>` using Python and the `lxml` library.

The workflow is part of the FrutosDigital digital critical-genetic edition project of Frutos de mi tierra by Tomás Carrasquilla.

## Contents

- `transformacion_tei.py`: Python script exported from Google Colab
- `requirements.txt`: Python environment specification
- `README.md`: Documentation of the workflow

## Functionality

The script performs:
- Parsing of TEI-XML files
- Namespace-aware XPath processing
- Structural transformation from `<lg>/<l>` to `<p>`
- Preservation of textual content and hierarchy
- Export of a valid TEI XML file

## Requirements

Install dependencies with:

Main dependency:
- lxml

## Reproducibility

The workflow is designed to be executed in Google Colab or any Python 3 environment supporting `lxml`. The inclusion of `requirements.txt` ensures computational reproducibility across systems.

## Project context

This deposit is part of the FrutosDigital, a digital critical-genetic edition that integrates TEI encoding, computational philology, and digital humanities methods for the study of Colombian literature.