mirror of
https://github.com/ElnuDev/rust-jmdict.git
synced 2025-07-01 05:16:01 -07:00
reset history
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.
This commit is contained in:
commit
5ceeec3acc
26 changed files with 195162 additions and 0 deletions
16
examples/count_matches.rs
Normal file
16
examples/count_matches.rs
Normal file
|
@ -0,0 +1,16 @@
|
|||
/*******************************************************************************
|
||||
* 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);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue