feat(README): 添加配置文件解析模块与个性化词汇功能说明
This commit is contained in:
parent
ef8488bb36
commit
9ebcd0bf1b
13
README.md
13
README.md
|
|
@ -65,9 +65,11 @@ SUIME/
|
||||||
├── src/ # Rust 服务端源码
|
├── src/ # Rust 服务端源码
|
||||||
│ ├── main.rs # 入口:根据 OS 自动选择监听模式 (UDS/TCP)
|
│ ├── main.rs # 入口:根据 OS 自动选择监听模式 (UDS/TCP)
|
||||||
│ ├── model.rs # ONNX 模型加载与推理封装
|
│ ├── model.rs # ONNX 模型加载与推理封装
|
||||||
|
│ ├── config.rs # 配置文件解析与加载,配置文件放在user_config_dir(类似~/.config/suime/config.toml),无配置可直接生成默认配置
|
||||||
│ ├── tokenizer.rs # 分词器封装
|
│ ├── tokenizer.rs # 分词器封装
|
||||||
│ ├── protocol.rs # 跨平台通用的请求/响应结构体 (MessagePack)
|
│ ├── protocol.rs # 跨平台通用的请求/响应结构体 (MessagePack)
|
||||||
│ └── socket.rs # 【核心】通信层抽象 (支持 UDS/TCP 条件编译)
|
│ └── socket.rs # 通信层抽象 (支持 UDS/TCP 条件编译)
|
||||||
|
│ └── personal.rs # 个性化词汇的登录管理和查询(未来扩展)
|
||||||
├── fcitx5-ext/ # [Linux] fcitx5 插件源码
|
├── fcitx5-ext/ # [Linux] fcitx5 插件源码
|
||||||
│ ├── CMakeLists.txt
|
│ ├── CMakeLists.txt
|
||||||
│ ├── src/
|
│ ├── src/
|
||||||
|
|
@ -77,7 +79,7 @@ SUIME/
|
||||||
├── clients/ # [未来] 其他平台客户端
|
├── clients/ # [未来] 其他平台客户端
|
||||||
│ ├── weasel-mod/ # (计划) Windows Rime 定制版
|
│ ├── weasel-mod/ # (计划) Windows Rime 定制版
|
||||||
│ └── squirrel-mod/ # (计划) macOS Rime 定制版
|
│ └── squirrel-mod/ # (计划) macOS Rime 定制版
|
||||||
├── models/ # ONNX 模型文件 & 词表
|
├── assets/ # ONNX 模型文件 & 词表
|
||||||
└── README.md
|
└── README.md
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
@ -100,7 +102,6 @@ use serde::{Serialize, Deserialize};
|
||||||
pub struct Request {
|
pub struct Request {
|
||||||
pub pinyin: String, // 用户输入的拼音串
|
pub pinyin: String, // 用户输入的拼音串
|
||||||
pub context: String, // 光标前文本 (用于上下文预测)
|
pub context: String, // 光标前文本 (用于上下文预测)
|
||||||
pub personal: Vec<String>, // 用户个性化词库 (可选)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Serialize, Deserialize)]
|
#[derive(Debug, Serialize, Deserialize)]
|
||||||
|
|
@ -113,6 +114,8 @@ pub struct Candidate {
|
||||||
#[derive(Debug, Serialize, Deserialize)]
|
#[derive(Debug, Serialize, Deserialize)]
|
||||||
pub struct Response {
|
pub struct Response {
|
||||||
pub candidates: Vec<Candidate>,
|
pub candidates: Vec<Candidate>,
|
||||||
|
pub offset: usize,
|
||||||
|
pub limit: usize,
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
@ -133,8 +136,8 @@ pub struct Response {
|
||||||
## 🗺️ 开发与部署路线图
|
## 🗺️ 开发与部署路线图
|
||||||
|
|
||||||
### 阶段一:Linux 原生完善 (Current)
|
### 阶段一:Linux 原生完善 (Current)
|
||||||
- [x] 完成 Rust 服务端 UDS 通信与 ONNX 推理。
|
- [ ] 完成 Rust 服务端 UDS 通信与 ONNX 推理。
|
||||||
- [x] 完成 fcitx5 插件开发与联调。
|
- [ ] 完成 fcitx5 插件开发与联调。
|
||||||
- [ ] 性能优化:引入线程池,减少上下文切换开销。
|
- [ ] 性能优化:引入线程池,减少上下文切换开销。
|
||||||
- [ ] 打包:提供 `.deb` / `.rpm` 安装包及 systemd 用户服务配置。
|
- [ ] 打包:提供 `.deb` / `.rpm` 安装包及 systemd 用户服务配置。
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue