advanced-text-search-matching

Indexes documents and searches exact or fuzzy text matches with positional tracking.

2|3|Updated Oct 21, 2025
One-click install
npx skills add https://github.com/vishalsachdev/claude-skills --skill advanced-text-search-matching
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: advanced-text-search-matching
Source: https://github.com/vishalsachdev/claude-skills/tree/main/advanced-text-search-matching
Command: npx skills add https://github.com/vishalsachdev/claude-skills --skill advanced-text-search-matching

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Production-grade text search and matching across large documents, with fast, accurate algorithms including Boyer-Moore, n-gram similarity, and efficient indexing for real-time queries.

Core Features & Use Cases

  • Boyer-Moore Search: fast exact substring matching.
  • N-gram Similarity: fuzzy matching for approximate quotes.
  • Document Indexing: word and n-gram indices for quick lookup.
  • Segment Mapping: track exact positions within documents.

Quick Start

Index a document into the index with buildDocumentIndex, then search for a query using boyerMooreSearch and calculateNgramSimilarity to rank results.

Frequently Asked Questions about advanced-text-search-matching

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement fast text search across large documents?

Fast text search in large documents uses Boyer-Moore exact substring matching combined with n-gram indexing for rapid lookups. Build a document index with word and n-gram indices, then query using Boyer-Moore search and n-gram similarity scoring to rank results efficiently.

Can I find approximate text matches or fuzzy search results in transcripts?

Fuzzy matching works through n-gram similarity with Jaccard scoring, enabling approximate quote detection across transcripts. This handles imperfect matches while maintaining speed, useful when exact text varies slightly across documents.

How do I track exact character positions within segmented documents?

Segment mapping preserves precise character-level positions throughout the document, enabling character-accurate highlighting and position tracking. This works across segmented or chunked content to maintain positional accuracy.

What's the best approach for building real-time search features on long documents?

Production-grade text search combines Boyer-Moore for exact matches, n-gram indices for fast approximate searches, and document indexing for real-time queries. Multi-strategy cascading matching optimizes performance across varying query patterns.

Does this work for finding quoted text with minor variations?

Yes. N-gram similarity with Jaccard scoring finds quoted text even with minor variations, typos, or formatting differences. The cascading matching strategy handles both exact and approximate quote retrieval.

What are the performance tradeoffs between exact and fuzzy search methods?

Boyer-Moore exact search is fastest but requires precise text match. N-gram fuzzy matching trades speed for flexibility to catch variations. Document indexing balances both by preprocessing for rapid queries across large documents.