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
@@ -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");
|
||||
|
||||
@@ -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")
|
||||
}
|
||||
@@ -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(())
|
||||
}
|
||||
@@ -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());
|
||||
|
||||
@@ -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());
|
||||
|
||||
@@ -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());
|
||||
|
||||
Reference in new issue
Block a user