pub fn analyze(hashments: &Vec<Hashment>, memory: &HashedMemory) -> Analysis
Expand description

Given hashments and an optional hashed translation memory, this function will perform the final analysis.

Example

let mut memfile = File::open("files/mem.tmx").unwrap();
let mut memciphertext = Vec::new();
memfile.read_to_end(&mut memciphertext).unwrap();  
 
let mem = HashedMemory::from_tmx(&memciphertext).unwrap();
 
let mut file = File::open(&path).unwrap();
let mut ciphertext = Vec::new();
file.read_to_end(&mut ciphertext).unwrap();  
 
let texts = extract(ciphertext, &path, ExtractionRules::default()).unwrap();
let hashments = filecount::segmentation::hashment_many(texts, &UnicodeRules);
let analysis = analyze(hashments, &mem);