Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbhaddow <bhaddow@1f5c12ca-751b-0410-a591-d2e778427230>2008-06-24 23:27:18 +0400
committerbhaddow <bhaddow@1f5c12ca-751b-0410-a591-d2e778427230>2008-06-24 23:27:18 +0400
commit83f234cf17663e5e1b68bccf00d0aac8e6da3418 (patch)
tree48d869c36267c8eaef60b8d293af1d1bf23664b5 /mert/ScorerFactory.h
parent6ddde13dca977c6ce386dc9a5b6a578a11f35585 (diff)
Implementation of Cer et al mert regularisation. Use with argument such
as --scconfig regtype:min,regwin:3 in extractor and mert. Only tested on toy example so far. git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@1860 1f5c12ca-751b-0410-a591-d2e778427230
Diffstat (limited to 'mert/ScorerFactory.h')
-rw-r--r--mert/ScorerFactory.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/mert/ScorerFactory.h b/mert/ScorerFactory.h
index 9afe36988..2ae9be38e 100644
--- a/mert/ScorerFactory.h
+++ b/mert/ScorerFactory.h
@@ -27,11 +27,11 @@ class ScorerFactory {
return types;
}
- Scorer* getScorer(const string& type) {
+ Scorer* getScorer(const string& type, const string& config = "") {
if (type == "BLEU") {
- return (BleuScorer*) new BleuScorer();
+ return (BleuScorer*) new BleuScorer(config);
} else if (type == "PER") {
- return (PerScorer*) new PerScorer();
+ return (PerScorer*) new PerScorer(config);
} else {
throw runtime_error("Unknown scorer type: " + type);
}