-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrun_tests.py
101 lines (93 loc) · 6.2 KB
/
run_tests.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
import unittest
# Test clases for the training procedure.
from training.ruleindex_test import T2TGetRelevantRulesTestCase
from training.transductionrule_test import (ApplyRuleTestCase, RuleComparisonTestCase,
PrintYamlTestCase, CopyRuleTestCase, PrintTiburonTestCase, ParseTiburonTestCase,
RuleToTreePatternsTestCase)
from training.transducer_test import (ProduceTestCase, GetNonterminalsTestCase,
TransduceTestCase, TransduceTestCase)
from training.wrtg_test import (PruneTestCase, InsideOutsideTestCase,
GenerateTreesTestCase, TargetProjectionFromDerivationTestCase,
SourceProjectionFromDerivationMixTestCase,
SourceProjectionFromDerivationStrictTestCase, ObtainBestDerivationTestCase)
from training.train_perceptron_test import TrainPerceptronTestCase
# Test clases for the rule extraction procedure.
from extraction.extractor_test import (ExtractRulesTestCase, ObtainTreePatternTestCase,
GetDisjointPathsTestCase, ExtractRulesDepsTestCase, GetCommonParentsAtTestCase,
TransformationTestCase)
from extraction.feat_instantiator_test import LexicalFeaturesTestCase
from utils.priority_queue_test import PriorityQueueTestCase
# Test classes for tree utilities.
from utils.tree_tools_test import (TreePatternTestCase, GetPathsSpanningLeavesTestCase,
GetInnerNodesTestCase, GetChildrenPathsTestCase, TreeContainsTestCase)
# Test classes for generator utilities.
from utils.generators_test import (GeneratorsListTestCase, PeekIterableTestCase,
OrderedProductTestCase)
# Test classes for feature costs.
from linguistics.similarity_costs_deps_test import LexicalSimilarityDepsTestCase
from linguistics.similarity_pre_test import IdentitySimilarityTestCase
from linguistics.similarity_semantics_test import (InnerNodesDifferenceTestCase,
VariableDifferenceTestCase, TreeDifferenceComplexityTestCase, TreeSizeTestCase,
VariableDifferenceIndividualTestCase, EntityDifferenceIndividualTestCase)
from linguistics.similarity_qa_test import (NoSimilarityQATestCase, CountOpTestCase,
EntityLinkingTestCase, PredicateLinkingTestCase, BridgeLinkingTestCase)
# Test classes for semirings.
from semirings.semiring_prob_test import ProbSemiRingTestCase
if __name__ == '__main__':
suite1 = unittest.TestLoader().loadTestsFromTestCase(T2TGetRelevantRulesTestCase)
suite2 = unittest.TestLoader().loadTestsFromTestCase(TreeContainsTestCase)
suite3 = unittest.TestLoader().loadTestsFromTestCase(ApplyRuleTestCase)
suite4 = unittest.TestLoader().loadTestsFromTestCase(RuleComparisonTestCase)
suite6 = unittest.TestLoader().loadTestsFromTestCase(ProduceTestCase)
suite7 = unittest.TestLoader().loadTestsFromTestCase(GetNonterminalsTestCase)
suite8 = unittest.TestLoader().loadTestsFromTestCase(PruneTestCase)
suite9 = unittest.TestLoader().loadTestsFromTestCase(InsideOutsideTestCase)
suite11 = unittest.TestLoader().loadTestsFromTestCase(PrintYamlTestCase)
suite12 = unittest.TestLoader().loadTestsFromTestCase(
TargetProjectionFromDerivationTestCase)
suite13 = unittest.TestLoader().loadTestsFromTestCase(GenerateTreesTestCase)
suite14 = unittest.TestLoader().loadTestsFromTestCase(TransduceTestCase)
suite15 = unittest.TestLoader().loadTestsFromTestCase(
SourceProjectionFromDerivationMixTestCase)
suite16 = unittest.TestLoader().loadTestsFromTestCase(ExtractRulesTestCase)
suite17 = unittest.TestLoader().loadTestsFromTestCase(ObtainTreePatternTestCase)
suite18 = unittest.TestLoader().loadTestsFromTestCase(GetDisjointPathsTestCase)
suite19 = unittest.TestLoader().loadTestsFromTestCase(TreePatternTestCase)
suite20 = unittest.TestLoader().loadTestsFromTestCase(LexicalSimilarityDepsTestCase)
suite22 = unittest.TestLoader().loadTestsFromTestCase(
SourceProjectionFromDerivationStrictTestCase)
suite23 = unittest.TestLoader().loadTestsFromTestCase(ObtainBestDerivationTestCase)
suite24 = unittest.TestLoader().loadTestsFromTestCase(ProbSemiRingTestCase)
suite26 = unittest.TestLoader().loadTestsFromTestCase(CopyRuleTestCase)
suite27 = unittest.TestLoader().loadTestsFromTestCase(IdentitySimilarityTestCase)
suite28 = unittest.TestLoader().loadTestsFromTestCase(GetCommonParentsAtTestCase)
suite29 = unittest.TestLoader().loadTestsFromTestCase(TransformationTestCase)
suite30 = unittest.TestLoader().loadTestsFromTestCase(PriorityQueueTestCase)
suite31 = unittest.TestLoader().loadTestsFromTestCase(GetPathsSpanningLeavesTestCase)
suite32 = unittest.TestLoader().loadTestsFromTestCase(InnerNodesDifferenceTestCase)
suite33 = unittest.TestLoader().loadTestsFromTestCase(VariableDifferenceTestCase)
suite34 = unittest.TestLoader().loadTestsFromTestCase(GetInnerNodesTestCase)
suite36 = unittest.TestLoader().loadTestsFromTestCase(TreeSizeTestCase)
suite37 = unittest.TestLoader().loadTestsFromTestCase(GetChildrenPathsTestCase)
suite38 = unittest.TestLoader().loadTestsFromTestCase(NoSimilarityQATestCase)
suite42 = unittest.TestLoader().loadTestsFromTestCase(VariableDifferenceIndividualTestCase)
suite43 = unittest.TestLoader().loadTestsFromTestCase(EntityDifferenceIndividualTestCase)
suite45 = unittest.TestLoader().loadTestsFromTestCase(GeneratorsListTestCase)
suite46 = unittest.TestLoader().loadTestsFromTestCase(PeekIterableTestCase)
suite47 = unittest.TestLoader().loadTestsFromTestCase(OrderedProductTestCase)
suite48 = unittest.TestLoader().loadTestsFromTestCase(PrintTiburonTestCase)
suite49 = unittest.TestLoader().loadTestsFromTestCase(ParseTiburonTestCase)
suite50 = unittest.TestLoader().loadTestsFromTestCase(TrainPerceptronTestCase)
suite51 = unittest.TestLoader().loadTestsFromTestCase(RuleToTreePatternsTestCase)
suite52 = unittest.TestLoader().loadTestsFromTestCase(LexicalFeaturesTestCase)
suite53 = unittest.TestLoader().loadTestsFromTestCase(CountOpTestCase)
suites = unittest.TestSuite([
suite1, suite2, suite3, suite4, suite6, suite7, suite8, suite9,
suite11, suite12, suite13, suite14, suite15, suite16, suite17, suite18, suite19,
suite20,
suite22, suite23, suite24, suite26, suite27, suite28,
suite29, suite30, suite31, suite32, suite33, suite34,
suite36, suite37, suite38,
suite42, suite43, suite45, suite46, suite47, suite48, suite49,
suite50, suite51, suite52, suite53])
unittest.TextTestRunner(verbosity=2).run(suites)