Skip to content
Back to skills

900 Feature Text Segmenter 0092a201

ASecurity

Define the requirements for the deterministic text segmentation module.

  • 9 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 11, 2026
developmentgo

Security analysis

A100/100

Scanned October 11, 2026

npx -y skills add tools-only/X-Skills --skill 900-feature-text-segmenter_0092a201 --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of 900 Feature Text Segmenter 0092a201?

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

Security grade badge for 900 Feature Text Segmenter 0092a201
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/tools-only-900-feature-text-segmenter-0092a201/badge)](https://www.skillsdirectory.com/skills/tools-only-900-feature-text-segmenter-0092a201)

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

SKILL.md
---
phase: requirements
title: Requirements - Text Segmenter
description: Define the requirements for the deterministic text segmentation module.
---

# Requirements & Problem Understanding

## Problem Statement
**What problem are we solving?**

- Validating PDF to EPUB conversion requires comparing the text content of both files.
- Directly comparing long strings is brittle due to minor formatting differences, OCR artifacts, or layout-induced reordering.
- We need a way to break down long text into manageable, reproducible "chunks" to calculate metrics like text recall and reading order score.

## Goals & Objectives
**What do we want to achieve?**

- **Deterministic Segmentation:** Given the same input text, the output chunks must always be the same.
- **Support for Overlap:** Chunks should overlap to ensure that tokens/words potentially split at a boundary are fully present in at least one (or both) adjacent chunks.
- **Metadata preservation:** Each chunk must know its relative position in the original text.
- **Normalization:** Minimize noise by normalizing whitespace before segmentation.

## User Stories & Use Cases
**How will users interact with the solution?**

- As a developer, I want to call a `segment_text` function with a string and get a list of segments.
- As a validator, I want the segments to be represented as objects containing the text and index metadata.
- As a system, I want to use standard constants for chunk size (600) and overlap (100).

## Success Criteria
**How will we know when we're done?**

- `pdf_to_epub/core/text_segmenter.py` is implemented.
- The segmentation logic handles strings shorter than the chunk size correctly.
- Overlap logic correctly recalculates the start position of subsequent chunks.
- 100% test coverage with 0 bugs in boundary conditions.

## Constraints & Assumptions
**What limitations do we need to work within?**

- Must be extremely performant as it will process entire books.
- Must use the constants defined in `core/utils.py`.
- Assumption: The input text is already canonicalized (normalized Unicode, etc.) by a previous step, but basic whitespace normalization should happen here too.

## Questions & Open Items
**What do we still need to clarify?**

- Should we segment by characters or tokens (words)? (Decision: Character-based for simplicity and predictability in Level 0).
- How to handle very small overlaps vs large ones?

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.