A cross-platform application streamlines the process of converting linguistic interlinear glossed text (IGT) data, typically copied as Tab-Separated Values (TSV) from FieldWorks Language Explorer (FLEx) ( or spreadsheets, into common publication formats.
The tool cleans the raw TSV data and provides one-click conversion to LaTeX, XML, and HTML formats.
- Clipboard-to-Format: Directly pastes and processes TSV data copied from the clipboard.
- Format Conversion: Output interlinear text in multiple reliable formats:
- LaTeX (XeTeX): Formats for packages like
ling-exampleorgb4e(using\gllland similar commands). - xlingpaper XML: Outputs XLingPaper XML code for interlinear examples (and list interlinear examples) that can be pasted into the source code view.
- HTML: Generates clean HTML markup, suitable for pasting into wikis or web content.
- LaTeX (XeTeX): Formats for packages like
- Data Pre-processing: Automatically cleans the TSV data, removes entirely blank columns, attempts to handle numbered examples, and copies morpheme break markers (e.g.,
-,=,.) from the Morphemes row to the Lex. Gloss row. - Manual Entry/Editor: Includes a built-in spreadsheet-like editor for manual creation or fine-tuning of interlinear examples.
For Windows users, the tool is distributed as a single, portable executable file (built with PyInstaller's --onefile --windowed options). No installation is required—just download and run.
- Download: FLEx Interlinear Copy Assistant
- Usage: Download the file and double-click to run.
This tool is written in Python 3. To run it directly from the source code, you must have Python 3 and the pyperclip dependency installed.
- Download: Clone this repository or download the
flex-interlinear-copy.pyfile. - Install Dependency:
pip install pyperclip
- Run the script:
python3 flex-interlinear-copy.py
We are actively seeking contributors to implement the following high-priority features and fixes:
- Multi-Example Clipboard Support:
- Goal: Allow users to copy and paste multiple interlinear examples from a source (e.g., FLEx or spreadsheet) at once.
- Current State: The application currently only processes a single interlinear example (one sentence) per clipboard paste.
- Automatic Text Reference Capture:
- Goal: Implement logic to automatically detect and parse the text source abbreviation and line number (e.g.,
TXT:12a) from the input data. - Benefit: This would eliminate the need for users to manually add this reference to the output formats (LaTeX, XML).
- Goal: Implement logic to automatically detect and parse the text source abbreviation and line number (e.g.,
- Manual Editor Overhaul:
- Goal: Fix critical bugs and improve the usability of the manual interlinear editor.
- Current State: The editor is known to be buggy and requires significant work to make it a reliable feature for creating or editing examples within the GUI.
- MS Word MathML Implementation:
- Goal: Research and implement a robust method for outputting the data as Microsoft Word MathML for clean interlinear display in Word documents.
- Constraint: This feature is currently disabled in the GUI and will probably always be inaccessible on macOS. Implementation must focus on platform-specific methods for Windows that can correctly place the complex MathML data onto the clipboard, potentially requiring system APIs beyond standard Python libraries. MathML also turns out to be very difficult to work with outside of Word.
- Windows Bootstrapper/Network Installer (probably using an NSIS or similar installer script):
- Goal: Create an easy to use Windows installer that is under 25MB that works by downloading and installing python and dependencies to the app install directory and then creating a start menu shortcut that will run the app.
- Constraint: The goal is a simple, lightweight bundle (under 25MB) that can be hosted directly in the GitHub repository, which looks a lot less sketchy and is also a more user friendly experience.
We welcome contributions! If you have a bug fix or feature suggestion, please open an Issue or submit a Pull Request. Specific contributions are needed for the Major Development Targets listed above.
Copyright © 2025 Seth Johnston
This software is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see https://www.gnu.org/licenses/.
This project was a collaborative effort between human direction and artificial intelligence, built upon the foundation of the Python open-source ecosystem.
-
Primary Architect & Coder: ChatGPT 4.0 (OpenAI)
- The vast majority of the code was generated by the AI, with the human developer acting as a director, providing strategic input, and conducting rigorous testing.
-
Open-Source Dependencies:
- Python Standard Library: The project relies extensively on modules from the Python Standard Library (e.g.,
os,tkinter,re,xml). - Third-Party Libraries: Special thanks to the creators of pyperclip, an essential third-party library used for cross-platform copy/paste functionality.
- Python Standard Library: The project relies extensively on modules from the Python Standard Library (e.g.,