cedict 0.3.2

Parser for the CC-CEDICT Chinese-English Dictionary
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
extern crate cedict;

use std::fs::File;
use std::io::BufRead;
use std::io::BufReader;

fn main() {
    let file = File::open("cedict.txt").unwrap();
    let reader = BufReader::new(file);
    let lines = reader.lines().filter_map(|l| l.ok());
    let entries = lines.map(cedict::parse_line);

    for entry in entries {
        println!("{:?}", entry);
    }
}