Commit ac26c725 authored by Ulrich's avatar Ulrich

test

parent 89a82b4e
......@@ -158,25 +158,27 @@ fn find_content(node : &mut Node, annotation_document : &Document, original_docu
}else {
if let Some(child) = cc {
let qe = parse_cnml(&child, annotation_document).unwrap();
let opt_qe = parse_cnml(&child, annotation_document);
let decl_score = score_declaration(&qe, declaration_symbols);
if let Some(qe) = opt_qe {
if decl_score.is_some(){
println!("found declaration score");
c_unw.remove_property("score");
c_unw.add_property("score", &decl_score.unwrap());
let decl_score = score_declaration(&qe, declaration_symbols);
}else {
let inv_score = 1.0 / score_annotation(&qe);
let as_score = bad_score_for_as(&qe);
if decl_score.is_some() {
println!("found declaration score");
c_unw.remove_property("score");
c_unw.add_property("score", &decl_score.unwrap());
} else {
let inv_score = 1.0 / score_annotation(&qe);
let as_score = bad_score_for_as(&qe);
c_unw.remove_property("score");
c_unw.remove_property("score");
let new_score = if as_score < 0.0 { as_score } else { inv_score };
c_unw.add_property("score", &format!("{}", new_score));
let new_score = if as_score < 0.0 { as_score } else { inv_score };
c_unw.add_property("score", &format!("{}", new_score));
vec.push(qe);
vec.push(qe);
}
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment