xzy-jason/dsh-chinese-search0

dsh-chinese-search

基于结巴分词的 DeepSeek Harness 记忆插件中文全文检索增强插件

AI 分析

核心用途是为 DSH 记忆插件提供中文分词检索支持。适合配合 sage-mem、dsh-memory 等记忆插件使用,解决原生数据库对中文搜索支持不佳、无法精准匹配中文关键词的问题。

套件
dsh-chinese-search
版本
0.1.0
最近更新
2026年8月14日

安裝

此插件尚未提供可驗證的 bundle,或相容性檢查未通過。請先閱讀倉庫說明。 閱讀完整 README ↗

Usage

With memory plugins

Works automatically with sage-mem, dsh-memory, and other memory plugins. Just install and it enhances search:

dsh plugin add dsh-chinese-search
dsh plugin add sage-mem  # or any other memory plugin

Programmatic API

import { ChineseSearchEngine } from 'dsh-chinese-search'
import Database from 'better-sqlite3'

const db = new Database('memory.db')
const engine = new ChineseSearchEngine(db)

// Create index
engine.createIndex('memory', 'content')

// Index documents
engine.indexDocument(1, '电力监控系统内生安全研究')
engine.indexDocument(2, 'DeepSeek V3 model architecture')

// Search (Chinese + English)
const results = engine.search('电力监控', 'memory')
// → [{ id: 1, content: '...', score: 0.95, matchedTerms: ['电力', '监控'] }]

Configuration