-
Notifications
You must be signed in to change notification settings - Fork 14
/
config.neon
166 lines (153 loc) · 4.15 KB
/
config.neon
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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
#
# SECURITY WARNING: it is CRITICAL that this file & directory are NOT accessible directly via a web browser!
#
# If you don't protect this directory from direct web access, anybody will be able to see your passwords.
# http://nette.org/security-warning
#
parameters:
title: MT-ComparEval
show_administration: true
php:
date.timezone: Europe/Prague
# zlib.output_compression: yes
application:
errorPresenter: Error
database:
dsn: 'sqlite:%appDir%/../storage/database'
debugger: false
explain: false
session:
expiration: 14 days
services:
routerFactory: RouterFactory( %consoleMode% )
router: @routerFactory::createRouter
ngramsCache: Nette\Caching\Cache( Nette\Caching\Storages\FileStorage( %appDir%/../storage/precomputed_ngrams ) )
terCache:
class: Nette\Caching\Cache( Nette\Caching\Storages\FileStorage( %appDir%/../storage/ter ) )
autowired: no
hjersonCache:
class: Nette\Caching\Cache( Nette\Caching\Storages\FileStorage( %appDir%/../storage/hjerson ) )
autowired: no
cacheStorage:
class: Nette\Caching\Storages\DevNullStorage
# Models
experiments: Experiments
tasks: Tasks
sentences: Sentences
metrics: Metrics
ngrams: CachedNGrams
# Metrics
brevityPenaltyMetric: BrevityPenalty
bleuMetric: Bleu( @geometricPrecisionMetric, @brevityPenaltyMetric )
hjersonWOMetric: Hjerson("bhypRer", @hjersonCache)
hjersonFormMetric: Hjerson("bhypINFer", @hjersonCache)
hjersonOmissionMetric: Hjerson("bMISer", @hjersonCache)
hjersonAdditionMetric: Hjerson("bEXTer", @hjersonCache)
hjersonMistranslationMetric: Hjerson("bhypLEXer", @hjersonCache)
fmeasureMetric: FMeasure( @arithmeticPrecisionMetric, @arithmeticRecallMetric )
terMetric: Ter( @terCache )
bootstrapSampler: BootstrapSampler( 1000 )
geometricPrecisionMetric:
factory: GeometricPrecision
arithmeticPrecisionMetric:
factory: ArithmeticPrecision
geometricRecallMetric:
factory: GeometricRecall
arithmeticRecallMetric:
factory: ArithmeticRecall
experimentsImporter:
class: ExperimentsImporter
setup:
- setLogger( @logger )
- setNormalizer( @normalizer )
tasksImporter:
class: TasksImporter(
@experiments,
@tasks,
@ngrams,
@bootstrapSampler,
PreprocessorList( [
@initialPreprocessor
@ngramsPreprocessor
@confirmedNGramsPreprocessor
@ngramsCounterPreprocessor
] ),
@enabledMetrics,
)
setup:
- setLogger( @logger )
- setNormalizer( @normalizer )
enabledMetrics: EnabledMetricsList( [
#BREVITY-PENALTY: [
# class: @brevityPenaltyMetric,
# case_sensitive: False,
# compute_bootstrap: False,
#],
BLEU: [
class: @bleuMetric,
case_sensitive: False,
compute_bootstrap: True,
],
BLEU-cased: [
class: @bleuMetric,
case_sensitive: True,
compute_bootstrap: True,
],
PRECISION: [
class: @arithmeticPrecisionMetric,
case_sensitive: False,
compute_bootstrap: False,
],
RECALL: [
class: @arithmeticRecallMetric,
case_sensitive: False,
compute_bootstrap: False,
],
F-MEASURE: [
class: @fmeasureMetric,
case_sensitive: False,
compute_bootstrap: False,
],
H-WORDORDER: [
class: @hjersonWOMetric,
case_sensitive: False,
compute_bootstrap: False,
],
H-ADDITION: [
class: @hjersonAdditionMetric,
case_sensitive: False,
compute_bootstrap: False,
],
H-MISTRANSLATION: [
class: @hjersonMistranslationMetric,
case_sensitive: False,
compute_bootstrap: False,
],
H-OMISSION: [
class: @hjersonOmissionMetric,
case_sensitive: False,
compute_bootstrap: False,
],
H-FORM: [
class: @hjersonFormMetric,
case_sensitive: False,
compute_bootstrap: False,
],
TER: [
class: @terMetric,
case_sensitive: False,
compute_bootstrap: False,
]
] )
# Importers dependencies
logger: EchoLogger
tokenizer: Tokenizer( true )
ngramizer: NGramizer
# Replace MTEvalInternationalNormalizer with MTEvalNormalizer
# if you want to get results compatible with matrix.statmt.org
normalizer: MTEvalInternationalNormalizer
# Sentences preprocessors
initialPreprocessor: InitialPreprocessor
ngramsPreprocessor: NGramsPreprocessor
confirmedNGramsPreprocessor: ConfirmedNGramsPreprocessor( ConfirmedNGramsFinder() )
ngramsCounterPreprocessor: NGramsCounterPreprocessor