Skip to content
Back to skills

Data Preparation

ASecurity

"Guides pix2tex formula extraction, tokenizer and dataset pickle

  • 247 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 8, 2026
toolspythongobashapi

Works with

  • api

Security analysis

A100/100

Pro scans all 7 files and shows the line behind each finding

Scanned September 8, 2026

npx -y skills add VectorSpaceLab/AREX-Skill --skill data-preparation --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Data Preparation?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Data Preparation
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-data-preparation-084ddd1c/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-data-preparation-084ddd1c)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: data-preparation
description: "Guides pix2tex formula extraction, tokenizer and dataset pickle
  creation, LaTeX rendering, scraping boundaries, and data-format
  troubleshooting."
disable-model-invocation: true
metadata:
  disco-role: operating
license: MIT
---

# Data Preparation

Use this sub-skill when the user needs to prepare image/LaTeX pairs for
LaTeX-OCR, extract formulas from TeX-like documents, create a tokenizer, build
`Im2LatexDataset` pickle files, render formulas to PNGs, or plan safe data
acquisition. Use this before training and evaluation.

## Quick Route

1. Read [references/data-formats.md](references/data-formats.md) for equation
   text files, image naming, tokenizer JSON, and dataset pickle expectations.
2. Read [references/rendering-and-preprocessing.md](references/rendering-and-preprocessing.md)
   before rendering LaTeX to PNG or normalizing formulas.
3. Read [references/data-acquisition.md](references/data-acquisition.md) before
   web, Wikipedia, StackExchange, arXiv, or Google Drive acquisition.
4. Read [references/troubleshooting.md](references/troubleshooting.md) for
   missing system tools, bad formulas, naming mismatch, and import quirks.
5. Use [scripts/extract_math_snippets.py](scripts/extract_math_snippets.py) for
   safe local formula extraction, and
   [scripts/check_dataset_inputs.py](scripts/check_dataset_inputs.py) before
   running the package dataset builder.

## Typical Dataset Build Flow

```bash
# Validate inputs first; this does not create a pickle.
python scripts/check_dataset_inputs.py --equations math.txt --images images/

# Then build the package dataset pickle when the validation looks right.
python -m pix2tex.dataset.dataset \
  --equations math.txt \
  --images images/ \
  --tokenizer tokenizer.json \
  --out dataset.pkl
```

To train a new tokenizer from formulas only:

```bash
python -m pix2tex.dataset.dataset --equations math.txt --vocab-size 8000 --out tokenizer.json
```

## Boundaries

- Training/evaluation commands belong in
  [../training-and-evaluation/SKILL.md](../training-and-evaluation/SKILL.md).
- OCR inference and image capture belong in
  [../ocr-inference/SKILL.md](../ocr-inference/SKILL.md).
- Network scraping, large downloads, TeX rendering, and dataset pickle creation
  can be long or system-dependent; confirm the user's budget and tools before
  running them.

Files in this skill

  • SKILL.md2.3 KB
  • references/data-acquisition.md1.2 KB
  • references/data-formats.md1.5 KB
  • references/rendering-and-preprocessing.md1.6 KB
  • references/troubleshooting.md1.6 KB
  • scripts/check_dataset_inputs.py2.4 KB
  • scripts/extract_math_snippets.py1.5 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.