From 1a525fa4d87e9391d35547e9d948834884d83fbd Mon Sep 17 00:00:00 2001 From: Yoonchae Lee Date: Fri, 19 Apr 2024 16:25:30 +0900 Subject: [PATCH] dev: download unidic from self repository The ninjal url sometimes goes down --- unidic/README.md | 2 +- unidic/src/main.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/unidic/README.md b/unidic/README.md index f8714ce1..c74799e7 100644 --- a/unidic/README.md +++ b/unidic/README.md @@ -1,4 +1,4 @@ -`/original` is UniDic 2.1.2 downloaded from [here](https://clrd.ninjal.ac.jp/unidic_archive/cwj/2.1.2/unidic-mecab_kana-accent-2.1.2_src.zip). +`/original` is UniDic 2.1.2 downloaded from [here](https://github.com/BlueGreenMagick/unidic-2.1.2-kana-accent/archive/refs/tags/2.1.2.zip). ## Lex Data diff --git a/unidic/src/main.rs b/unidic/src/main.rs index 489aca97..4d4d5914 100644 --- a/unidic/src/main.rs +++ b/unidic/src/main.rs @@ -110,8 +110,8 @@ fn skip_file_entry(entry: &DirEntry) -> bool { /// `output_path` must exist and be a directory fn download_unidic_original(output_path: &Path) -> Result<(), Box> { let download_url = - "https://clrd.ninjal.ac.jp/unidic_archive/cwj/2.1.2/unidic-mecab_kana-accent-2.1.2_src.zip"; - println!("Downloading unidic from {}", &download_url); + "https://github.com/BlueGreenMagick/unidic-2.1.2-kana-accent/archive/refs/tags/2.1.2.zip"; + println!("Downloading unidic from \"{}\"", &download_url); let resp = ureq::get(download_url).call()?; let mut tmpfile = tempfile::tempfile()?; std::io::copy(&mut resp.into_reader(), &mut tmpfile)?;