word segmentation and clipboard first word detector

This commit is contained in:
polv committed 2026-03-06 02:25:49 +07:00
1 parent 29a4d14893
commit 1614db6e99
19 files changed
+502 -13

No files matched your search

+11 -1
View File
@@ -3,7 +3,9 @@ use std::{
path::PathBuf,
};
use cjdic2_core::{AppService, CJDicError, SqlParam, YomitanRow, YomitanZipImportResult};
use cjdic2_core::{
AppService, CJDicError, SqlParam, TokenizeSegment, YomitanRow, YomitanZipImportResult,
};
use serde::{Deserialize, Serialize};
use tauri::{AppHandle, Emitter, Manager};
use tauri_plugin_http::reqwest::Client;
@@ -242,3 +244,11 @@ pub async fn download_url(
.await
.map_err(|e| CJDicError::Error(e.to_string()))
}
#[tauri::command]
pub async fn tokenize(
text: String,
state: tauri::State<'_, AppService>,
) -> Result<Vec<TokenizeSegment>, CJDicError> {
state.ja_tokenize(text)
}