Skip to content

Commit

Permalink
dev: download unidic from self repository
Browse files Browse the repository at this point in the history
The ninjal url sometimes goes down
  • Loading branch information
BlueGreenMagick committed Apr 19, 2024
1 parent 4ed2401 commit 1a525fa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion unidic/README.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
4 changes: 2 additions & 2 deletions unidic/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<dyn Error>> {
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)?;
Expand Down

0 comments on commit 1a525fa

Please sign in to comment.