mirror of
https://gitcode.com/JianFeeeee/HomeAgent.git
synced 2026-09-21 09:28:14 +00:00
- 根目录清理: branding/docs/knowledge -> assets/, package/tools/deploy -> deploy/ - meta.go: Version 0.7.2, SDKCompatibleVersion 语义改为最高兼容 - Makefile: 版本回退 0.7.2 - registry.go: 系统提示词改用 meta.Version 格式化 - Agent 心跳: reorgGraph 拆分为三个独立循环(archive/merge/review),各自可配间隔 - GraphDB: 新增 sentences 表 + 关系句子溯源 + ClearSentenceID + CleanupOrphanedSentences - Knowledge: 支持词嵌入向量化器 - NLP 四阶段流水线: Parse -> Extract -> Verify -> Fuse + SentenceRef - 移除远程 HTTP 解析器(remote_parser.go) - 新增内嵌 ONNX 模型(vocab + dep_parser.onnx): +build onnxruntime: 全量 ONNX Runtime 推理 !build onnxruntime: 内嵌词表规则式降级解析器 - config: core.agent.onnx_model_path 替代 dep_parser_url
28 lines
760 B
Go
28 lines
760 B
Go
package nlp
|
||
|
||
// ParseResult 依存句法分析结果
|
||
type ParseResult struct {
|
||
Tokens []string
|
||
POS []string
|
||
Heads []int // 父节点索引,0=ROOT
|
||
DepRels []string // 依存关系标签
|
||
}
|
||
|
||
// Triple 三元组 (subject, relation, object)
|
||
type Triple struct {
|
||
Subject string
|
||
Relation string
|
||
Object string
|
||
Score float64 // syntax_conf:句法置信度(Phase 2 输出)
|
||
VectorConf float64 // vector_conf:语义向量置信度(Phase 3 输出)
|
||
Src string // "dep" / "dep_coo" / "pos" / "fallback"
|
||
SentenceRef string // 原始句子,用于LLM复审时修正
|
||
}
|
||
|
||
// TripleSet 提取结果
|
||
type TripleSet struct {
|
||
Triples []Triple
|
||
Src string // "dep_parser" / "fallback" / ""
|
||
Err error
|
||
}
|