mirror of
https://github.com/ElnuDev/rust-jmdict.git
synced 2025-07-01 13:26:01 -07:00
There is about four weeks worth of history, the interesting parts of which I've documented in `CONTRIBUTING.md`. I'm now throwing this history away because there is a lot of messing with data files in there that bloats the repo unnecessarily, and this is my last chance to get rid of that bloat before other people start pulling it.
16 lines
594 B
Rust
16 lines
594 B
Rust
/*******************************************************************************
|
|
* Copyright 2021 Stefan Majewsky <majewsky@gmx.net>
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
* Refer to the file "LICENSE" for details.
|
|
*******************************************************************************/
|
|
|
|
fn main() {
|
|
let input = "日曜日";
|
|
let count = jmdict::entries()
|
|
.filter(|e| {
|
|
e.kanji_elements().any(|k| k.text == input)
|
|
|| e.reading_elements().any(|r| r.text == input)
|
|
})
|
|
.count();
|
|
println!("{} entries for {}", count, input);
|
|
}
|