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:
Stefan Majewsky 2021-04-18 14:13:28 +02:00
commit 5ceeec3acc
26 changed files with 195162 additions and 0 deletions

16
examples/count_matches.rs Normal file
View 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);
}