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:
authormachacekmatous <machacekmatous@1f5c12ca-751b-0410-a591-d2e778427230>2011-08-20 19:25:19 +0400
committermachacekmatous <machacekmatous@1f5c12ca-751b-0410-a591-d2e778427230>2011-08-20 19:25:19 +0400
commit642e8dce953127f9b3250b91a8b903d418420c86 (patch)
tree2bb16eefd84880fe3b73c3ee756f3d497844f216 /mert/Util.cpp
parent63fd490a51be2faf34d6d6ef4ef8104b78814e6e (diff)
Added evaluator to MERT directory. This tool computes a metric score for given candidate and reference files:
evaluator --sctype PER --reference ref.file --candidate cand.file usage: evaluator [options] --reference ref1[,ref2[,ref3...]] --candidate cand1[,cand2[,cand3...]] [--sctype|-s] the scorer type (default BLEU) [--scconfig|-c] configuration string passed to scorer This is of the form NAME1:VAL1,NAME2:VAL2 etc [--reference|-R] comma separated list of reference files [--candidate|-C] comma separated list of candidate files [--bootstrap|-b] number of booststraped samples (default 0 - no bootstraping) [--rseed|-r] the random seed for bootstraping (defaults to system clock) [--help|-h] print this message and exit git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@4153 1f5c12ca-751b-0410-a591-d2e778427230
Diffstat (limited to 'mert/Util.cpp')
-rw-r--r--mert/Util.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/mert/Util.cpp b/mert/Util.cpp
index 250455bd2..ffc8a4c7e 100644
--- a/mert/Util.cpp
+++ b/mert/Util.cpp
@@ -46,6 +46,14 @@ int getNextPound(std::string &theString, std::string &substring, const std::stri
return (pos);
};
+void split(const std::string &s, char delim, std::vector<std::string> &elems) {
+ std::stringstream ss(s);
+ std::string item;
+ while(std::getline(ss, item, delim)) {
+ elems.push_back(item);
+ }
+}
+
inputfilestream::inputfilestream(const std::string &filePath)
: std::istream(0),
m_streambuf(0)