# Text & Document Processing

Basic text extraction from structured documents and plain text formats.

**Text & Document Extractors**

- [Pass-Through Text Extractor](extractors-text-document-pass-through.html)
- [Metadata Text Extractor](extractors-text-document-metadata.html)
- [PDF Text Extractor](extractors-text-document-pdf.html)
- [MarkItDown Extractor](extractors-text-document-markitdown.html)
- [Unstructured Extractor](extractors-text-document-unstructured.html)

## Overview

Text and document extractors handle files with explicit text content or structured document formats. These extractors are ideal for:

- PDF documents with text layers
- Office documents (DOCX, XLSX, PPTX)
- Markdown and HTML files
- Plain text files
- Web content

## Available Extractors

### [pass-through-text](extractors-text-document-pass-through.html)

Returns existing extracted text without re-extraction. Useful for:
- Skipping extraction when text already exists
- Testing and debugging pipelines
- Preserving manually curated text

**Installation**: Included by default

### [metadata-text](extractors-text-document-metadata.html)

Extracts text from item metadata (title, tags, keywords). Useful for:
- Creating searchable metadata
- Generating synthetic corpus entries
- Testing without file content

**Installation**: Included by default

### [pdf-text](extractors-text-document-pdf.html)

Extracts text from PDF documents using pypdf. Ideal for:
- PDFs with selectable text layers
- Fast extraction without OCR overhead
- Simple document processing

**Installation**: Included by default

### [markitdown](extractors-text-document-markitdown.html)

Microsoft MarkItDown for Office documents and web content. Supports:
- DOCX, XLSX, PPTX
- HTML, MHTML
- Images (via OCR)
- Audio (via transcription)
- ZIP archives

**Installation**: `pip install biblicus[markitdown]` (Python 3.10+ only)

### [unstructured](extractors-text-document-unstructured.html)

Unstructured.io for complex document parsing. Supports:
- DOCX, XLSX, PPTX
- Email formats (EML, MSG)
- Markdown, HTML, XML
- Advanced chunking and partitioning

**Installation**: `pip install biblicus[unstructured]`

## Choosing an Extractor

| Format | Recommended Extractor | Alternative |
|--------|----------------------|-------------|
| PDF (text layer) | [pdf-text](extractors-text-document-pdf.html) | [markitdown](extractors-text-document-markitdown.html) |
| PDF (scanned) | See [OCR](extractors-ocr-index.html) or [VLM](extractors-vlm-document-index.html) | |
| DOCX, XLSX, PPTX | [markitdown](extractors-text-document-markitdown.html) | [unstructured](extractors-text-document-unstructured.html) |
| Markdown, HTML | [markitdown](extractors-text-document-markitdown.html) | [unstructured](extractors-text-document-unstructured.html) |
| Plain text | [pass-through-text](extractors-text-document-pass-through.html) | [metadata-text](extractors-text-document-metadata.html) |

## Common Patterns

### Fallback Chain

Use [select-text](extractors-pipeline-utilities-select-text.html) to try multiple extractors:

```yaml
extractor_id: select-text
config:
  extractors:
    - pdf-text
    - markitdown
    - unstructured
```

### Metadata + Content

Use [pipeline](extractors-pipeline-utilities-pipeline.html) to combine metadata and content:

```yaml
extractor_id: pipeline
config:
  extractors:
    - metadata-text
    - pdf-text
```

## See Also

- [Extractors Overview](extractors-index.html)
- [OCR Extractors](extractors-ocr-index.html) - For scanned documents
- [VLM Extractors](extractors-vlm-document-index.html) - For complex layouts
- [Pipeline Utilities](extractors-pipeline-utilities-index.html) - For combining strategies
