forked from Helsinki-NLP/OpusTools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbenchmarks.py
125 lines (106 loc) · 5.58 KB
/
benchmarks.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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
import time
import opus_read
def printResults(arguments):
start = time.time()
eprinter = opus_read.PairPrinter(arguments)
eprinter.printPairs()
end = time.time()
print("%.4f" % float(end-start), "s")
'''
print("Corpus: Books, 3654 alignment pairs, source: en, target: fi, all alignments ")
print("Exhaustive parser:")
printResults(["-d", "Books", "-s", "en", "-t", "fi", "-w", "test_result"])
print("Fast parser:")
printResults(["-d", "Books", "-s", "en", "-t", "fi", "-w", "test_result" , "-f"])
print("")
print("Corpus: Books, 129305 alignment pairs, source: en, target: fr, all alignments")
print("Exhaustive parser:")
printResults(["-d", "Books", "-s", "en", "-t", "fr", "-w", "test_result"])
print("Fast parser:")
printResults(["-d", "Books", "-s", "en", "-t", "fr", "-w", "test_result" , "-f"])
print("")
print("Corpus: Books, 3654 alignment pairs, source: en, target: fi, 10 alignments")
print("Exhaustive parser:")
printResults(["-d", "Books", "-s", "en", "-t", "fi", "-w", "test_result", "-m", "10"])
print("Fast parser:")
printResults(["-d", "Books", "-s", "en", "-t", "fi", "-w", "test_result" , "-f", "-m", "10"])
print("")
print("Corpus: Books, 129305 alignment pairs, source: en, target: fr, 10 alignments")
print("Exhaustive parser:")
printResults(["-d", "Books", "-s", "en", "-t", "fr", "-w", "test_result", "-m", "10"])
print("Fast parser:")
printResults(["-d", "Books", "-s", "en", "-t", "fr", "-w", "test_result" , "-f", "-m", "10"])
print("")
print("Corpus: Books, 3654 alignment pairs, source: en, target: fi, all alignments, preprocessing raw")
print("Exhaustive parser:")
printResults(["-d", "Books", "-s", "en", "-t", "fi", "-w", "test_result", "-p", "raw"])
print("Fast parser:")
printResults(["-d", "Books", "-s", "en", "-t", "fi", "-w", "test_result" , "-f", "-p", "raw"])
print("")
print("Corpus: Books, 129305 alignment pairs, source: en, target: fr, all alignments, preprocessing raw")
print("Exhaustive parser:")
printResults(["-d", "Books", "-s", "en", "-t", "fr", "-w", "test_result", "-p", "raw"])
print("Fast parser:")
printResults(["-d", "Books", "-s", "en", "-t", "fr", "-w", "test_result" , "-f", "-p", "raw"])
print("")
print("Corpus: Books, 3654 alignment pairs, source: en, target: fi, 10 alignments, preprocessing raw")
print("Exhaustive parser:")
printResults(["-d", "Books", "-s", "en", "-t", "fi", "-w", "test_result", "-m", "10", "-p", "raw"])
print("Fast parser:")
printResults(["-d", "Books", "-s", "en", "-t", "fi", "-w", "test_result" , "-f", "-m", "10", "-p", "raw"])
print("")
print("Corpus: Books, 129305 alignment pairs, source: en, target: fr, 10 alignments, preprocessing raw")
print("Exhaustive parser:")
printResults(["-d", "Books", "-s", "en", "-t", "fr", "-w", "test_result", "-m", "10", "-p", "raw"])
print("Fast parser:")
printResults(["-d", "Books", "-s", "en", "-t", "fr", "-w", "test_result" , "-f", "-m", "10", "-p", "raw"])
print("")
print("Corpus: Europarl, 1974717 alignment pairs, source: en, target: fi, all alignments ")
print("Exhaustive parser:")
printResults(["-d", "Europarl", "-s", "en", "-t", "fi", "-w", "test_result"])
print("Fast parser:")
printResults(["-d", "Europarl", "-s", "en", "-t", "fi", "-w", "test_result" , "-f"])
print("")
print("Corpus: Europarl, 2054543 alignment pairs, source: en, target: fr, all alignments")
print("Exhaustive parser:")
printResults(["-d", "Europarl", "-s", "en", "-t", "fr", "-w", "test_result"])
print("Fast parser:")
printResults(["-d", "Europarl", "-s", "en", "-t", "fr", "-w", "test_result" , "-f"])
print("")
print("Corpus: Europarl, 1974717 alignment pairs, source: en, target: fi, 10 alignments")
print("Exhaustive parser:")
printResults(["-d", "Europarl", "-s", "en", "-t", "fi", "-w", "test_result", "-m", "10"])
print("Fast parser:")
printResults(["-d", "Europarl", "-s", "en", "-t", "fi", "-w", "test_result" , "-f", "-m", "10"])
print("")
print("Corpus: Europarl, 2054543 alignment pairs, source: en, target: fr, 10 alignments")
print("Exhaustive parser:")
printResults(["-d", "Europarl", "-s", "en", "-t", "fr", "-w", "test_result", "-m", "10"])
print("Fast parser:")
printResults(["-d", "Europarl", "-s", "en", "-t", "fr", "-w", "test_result" , "-f", "-m", "10"])
print("")
print("Corpus: Europarl, 1974717 alignment pairs, source: en, target: fi, all alignments, preprocessing raw")
print("Exhaustive parser:")
printResults(["-d", "Europarl", "-s", "en", "-t", "fi", "-w", "test_result", "-p", "raw"])
print("Fast parser:")
printResults(["-d", "Europarl", "-s", "en", "-t", "fi", "-w", "test_result" , "-f", "-p", "raw"])
print("")
print("Corpus: Europarl, 2054543 alignment pairs, source: en, target: fr, all alignments, preprocessing raw")
print("Exhaustive parser:")
printResults(["-d", "Europarl", "-s", "en", "-t", "fr", "-w", "test_result", "-p", "raw"])
print("Fast parser:")
printResults(["-d", "Europarl", "-s", "en", "-t", "fr", "-w", "test_result" , "-f", "-p", "raw"])
print("")
print("Corpus: Europarl, 1974717 alignment pairs, source: en, target: fi, 10 alignments, preprocessing raw")
print("Exhaustive parser:")
printResults(["-d", "Europarl", "-s", "en", "-t", "fi", "-w", "test_result", "-m", "10", "-p", "raw"])
print("Fast parser:")
printResults(["-d", "Europarl", "-s", "en", "-t", "fi", "-w", "test_result" , "-f", "-m", "10", "-p", "raw"])
print("")
print("Corpus: Europarl, 2054543 alignment pairs, source: en, target: fr, 10 alignments, preprocessing raw")
print("Exhaustive parser:")
printResults(["-d", "Europarl", "-s", "en", "-t", "fr", "-w", "test_result", "-m", "10", "-p", "raw"])
print("Fast parser:")
printResults(["-d", "Europarl", "-s", "en", "-t", "fr", "-w", "test_result" , "-f", "-m", "10", "-p", "raw"])
print("")
'''