mirror of https://github.com/ElnuDev/rust-jmdict
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
594 B
17 lines
594 B
/*******************************************************************************
|
|
* 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);
|
|
}
|