Expand description
§Tanaka
A Rust interface to the Tanaka Corpus of parallel Japanese-English sentences.
The standard corpus is included - simply call examples() (or examples_subset()). These take up a few megabytes in the library - they can be excluded by disabling their respective feature flags.
let corpus = Corpus::examples();
println!("{:?}", corpus.examples[0]);
Otherwise, load the version of the corpus you want into a string, and parse it:
let text = "A: 彼は忙しいですか。 Is he busy?#ID=303692_100005\n\
B: 彼(かれ)[01] は 忙しい(いそがしい) ですか";
let corpus = Corpus::parse(text).unwrap();
println!("{:?}", corpus.examples[0]);
§Feature flags
include
(enabled by default) — Include the standard tanaka corpus in the library.include_subset
(enabled by default) — Include the standard tanaka corpus with only entries that have at least one checked word in the library.
Modules§
- data
- Data