JohnXu22786/semantic-search

JohnXu22786★ 0TypeScript最后同步: 2026-08-20

在 GitHub 打开

Local semantic code search for DeepSeek Harness (dsh): fragment-level, symbol-aware indexing, offline lexical embeddings or OpenAI-compatible endpoints, and hybrid vector + BM25 retrieval fused with RRF - three dsh tools (sema_search / sema_reindex / sema_stats) plus a sema CLI.

README 摘要

dsh-semantic-search Local semantic code search for DeepSeek Harness ( dsh ) — and any Node script. 中文文档:README.zh.md sema builds a fragment-level index of a workspace : source is tokenized by a language-aware tokenizer (camel/snake/kebab splitting, CJK n-grams), chunked with symbol-aware boundaries (functions/classes stay intact), and embedded into fixed dimension vectors — locally and dependency-free by default (feature-hashed lexical TF-IDF), or via any OpenAI-compatible embedding endpoint. Queries run a hybrid retrieval (vector cosine + BM25, fused with reciprocal-rank fusion) over the index, so meaning-based search works even when exact terms don't match. Ships as a dsh plugin bundle — the sema search , sema reindex and sema stats tools on the harness tool registry — plus a standalone sema CLI. Highlights - Works offline by default — the built-in lexical provider needs no network, no model download, no API key. Use it as a fast BM25-plus code search. - Symbol-aware chunking — boundaries from a conservative per-language table (16 languages) keep functions/classes intact; a missed boundary degrades to a plain chunk rather than breaking. - CJK-aware tokenizer — n-gram tokenization…

在 GitHub 查看完整 README →
终端/TUIdeepseek-harnessdshdsh-pluginsearch

分类