Example #1
0
 def test_rte_feature_extraction(self):
     pairs = rte_corpus.pairs(['rte1_dev.xml'])[:6]
     test_output = ["%-15s => %s" % (key, rte_features(pair)[key])
                    for pair in pairs for key in sorted(rte_features(pair))]
     expected_output = expected_from_rte_feature_extration.strip().split('\n')
     # Remove null strings.
     expected_output = list(filter(None, expected_output))
     self.assertEqual(test_output, expected_output)
Example #2
0
 def test_rte_feature_extraction(self):
     pairs = rte_corpus.pairs(['rte1_dev.xml'])[:6]
     test_output = ["%-15s => %s" % (key, rte_features(pair)[key])
                    for pair in pairs for key in sorted(rte_features(pair))]
     expected_output = expected_from_rte_feature_extration.strip().split('\n')
     # Remove null strings.
     expected_output = list(filter(None, expected_output))
     self.assertEqual(test_output, expected_output)
Example #3
0
 def test_rte_feature_extraction(self):
     pairs = rte_corpus.pairs(["rte1_dev.xml"])[:6]
     test_output = [
         f"{key:<15} => {rte_features(pair)[key]}" for pair in pairs
         for key in sorted(rte_features(pair))
     ]
     expected_output = expected_from_rte_feature_extration.strip().split(
         "\n")
     # Remove null strings.
     expected_output = list(filter(None, expected_output))
     assert test_output == expected_output