def score_amr_pairs(f1, f2, justinstance=False, justattribute=False, justrelation=False):
<EOL>total_match_num = total_test_num = total_gold_num = <NUM_LIT:0><EOL>for sent_num, (cur_amr1, cur_amr2) in enumerate(generate_amr_lines(f1, f2), start=<NUM_LIT:1>):<EOL><INDENT>best_match_num, test_triple_num, gold_triple_num = get_amr_match(cur_amr1, cur_amr2,<EOL>sent_num=sent_num,  <EOL>justinstance=justinstance,<EOL>justattribute=justattribute,<EOL>justrelation=justrelation)<EOL>total_match_num += best_match_num<EOL>total_test_num += test_triple_num<EOL>total_gold_num += gold_triple_num<EOL>match_triple_dict.clear()<EOL>if not single_score:  <EOL><INDENT>yield compute_f(best_match_num, test_triple_num, gold_triple_num)<EOL><DEDENT><DEDENT>if verbose:<EOL><INDENT>print("<STR_LIT>", file=DEBUG_LOG)<EOL>print(total_match_num, total_test_num, total_gold_num, file=DEBUG_LOG)<EOL>print("<STR_LIT>", file=DEBUG_LOG)<EOL><DEDENT>if single_score:  <EOL><INDENT>yield compute_f(total_match_num, total_test_num, total_gold_num)<EOL><DEDENT>
Score one pair of AMR lines at a time from each file handle
:param f1: file handle (or any iterable of strings) to read AMR 1 lines from
:param f2: file handle (or any iterable of strings) to read AMR 2 lines from
:param justinstance: just pay attention to matching instances
:param justattribute: just pay attention to matching attributes
:param justrelation: just pay attention to matching relations
:return: generator of cur_amr1, cur_amr2 pairs: one-line AMR strings