Esempio n. 1
0
 def test_word_baseline_3(self):
     print "Baseline: greedy_align_phrases"
     pred_pgc = copy.deepcopy(self.true_pgc)
     greedy_align_phrases(pred_pgc)
     align_eval = AlignEval()
     align_eval.add(self.true_pgc, pred_pgc)
     align_eval.run_eval()
     align_eval.write_alignment_overall()
Esempio n. 2
0
 def test_word_baseline_3(self):
     print "Baseline: greedy_align_phrases"
     pred_pgc = copy.deepcopy(self.true_pgc)
     greedy_align_phrases(pred_pgc)
     align_eval = AlignEval()
     align_eval.add(self.true_pgc, pred_pgc)
     align_eval.run_eval()
     align_eval.write_alignment_overall()
Esempio n. 3
0
 def test_word_baseline_2(self):
     # evaluation is incorrect, because true corpus also contains phrase
     # alignments
     print "Baseline: greedy_align_words"
     pred_pgc = copy.deepcopy(self.true_pgc)
     greedy_align_words(pred_pgc)
     align_eval = AlignEval()
     align_eval.add(self.true_pgc, pred_pgc)
     align_eval.run_eval()
     align_eval.write_alignment_overall()
Esempio n. 4
0
 def test_word_baseline_2(self):
     # evaluation is incorrect, because true corpus also contains phrase
     # alignments
     print "Baseline: greedy_align_words"
     pred_pgc = copy.deepcopy(self.true_pgc)
     greedy_align_words(pred_pgc)
     align_eval = AlignEval()
     align_eval.add(self.true_pgc, pred_pgc)
     align_eval.run_eval()
     align_eval.write_alignment_overall()