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

+3 -1
View File
@@ -9,8 +9,10 @@ use cjdic2_core::{AppService, Timer};
mod common;
use common::get_db_dir;
use crate::common::get_vibrato_dict_dir;
fn main() -> Result<(), anyhow::Error> {
let service = AppService::new(get_db_dir())?;
let service = AppService::new(get_db_dir(), get_vibrato_dict_dir())?;
let mut writer = service.get_yomitan_writer()?;
let zip_dir = Path::new("src-tauri/resources/yomitan");
+4
View File
@@ -3,3 +3,7 @@ use std::path::PathBuf;
pub fn get_db_dir() -> PathBuf {
PathBuf::from("tmp/save-db")
}
pub fn get_vibrato_dict_dir() -> PathBuf {
PathBuf::from("src-tauri/resources/ipadic-mecab/system.dic.zst")
}
+19
View File
@@ -0,0 +1,19 @@
use cjdic2_core::AppService;
mod common;
use common::get_db_dir;
use crate::common::get_vibrato_dict_dir;
fn main() -> Result<(), anyhow::Error> {
let service = AppService::new(get_db_dir(), get_vibrato_dict_dir())?;
println!(
"{:#?}",
service.ja_tokenize(
"予約キャンセル・変更は【配信日前日の19時頃】までに行ってください。".to_string()
)?
);
Ok(())
}
+3 -1
View File
@@ -4,8 +4,10 @@ use cjdic2_core::{AppService, Timer};
mod common;
use common::get_db_dir;
use crate::common::get_vibrato_dict_dir;
fn main() -> Result<(), anyhow::Error> {
let service = AppService::new(get_db_dir())?;
let service = AppService::new(get_db_dir(), get_vibrato_dict_dir())?;
{
let _timer = Timer::new("remove one".to_string());
+3 -1
View File
@@ -4,8 +4,10 @@ use cjdic2_core::{AppService, Timer};
mod common;
use common::get_db_dir;
use crate::common::get_vibrato_dict_dir;
fn main() -> Result<(), anyhow::Error> {
let service = AppService::new(get_db_dir())?;
let service = AppService::new(get_db_dir(), get_vibrato_dict_dir())?;
{
let _timer = Timer::new("Search".to_string());
+3 -1
View File
@@ -4,8 +4,10 @@ use cjdic2_core::{AppService, Timer};
mod common;
use common::get_db_dir;
use crate::common::get_vibrato_dict_dir;
fn main() -> Result<(), anyhow::Error> {
let service = AppService::new(get_db_dir())?;
let service = AppService::new(get_db_dir(), get_vibrato_dict_dir())?;
{
let _timer = Timer::new("update schema".to_string());