mirror of
https://github.com/patarapolw/cjdic2.git
synced 2026-11-09 17:39:35 +00:00
word segmentation and clipboard first word detector
This commit is contained in:
1 parent
29a4d14893
commit
1614db6e99
19 files changed
+502
-13
No files matched your search
@@ -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)
|
||||
}
|
||||
Reference in new issue
Block a user