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
AgeCommit message (Collapse)Author
2015-04-23Add cross-platform randomizer module.Jeroen Vermeulen
The code uses two mechanisms for generating random numbers: srand()/rand(), which is not thread-safe, and srandom()/random(), which is POSIX-specific. Here I add a util/random.cc module that centralizes these calls, and unifies some common usage patterns. If the implementation is not good enough, we can now change it in a single place. To keep things simple, this uses the portable srand()/rand() but protects them with a lock to avoid concurrency problems. The hard part was to keep the regression tests passing: they rely on fixed sequences of random numbers, so a small code change could break them very thoroughly. Util::rand(), for wide types like size_t, calls std::rand() not once but twice. This behaviour was generalized into utils::wide_rand() and friends.
2015-04-22Thread-safe, platform-agnostic randomizer.Jeroen Vermeulen
Some places in mert use srandom()/random(), but these are POSIX-specific. The standard alternative, srand()/rand(), is not thread-safe. This module wraps srand()/rand() in mutexes (very short-lived, so should not cost much) so that it relies on just Boost and the C standard library, not on a Unix-like environment. This may reduce the width of the random numbers on some platforms: it goes from "long int" to just "int". If that is a problem, we may have to use Boost's randomizer utilities, or eventually, the C++ ones.
2015-04-10Address two TODO notes in mert/evaluator.cpp.Jeroen Vermeulen
The notes were about two objects which were created on the free store using "new", then cleaned up using "delete". May have been a Java habit; the solution was as simple as creating them on the stack.
2015-04-10Portability and include fixes.Jeroen Vermeulen
Add <cstdlib> include for srand()/rand(), and <unistd.h> for open() etc. Include <unistd.h> on Windows if using MinGW. Disable MeteorScorer on Windows, since it doesn't have fork() and pipe().
2015-03-28Modernize "C" includes in mert.Jeroen Vermeulen
This is one of those little chores in managing a long-lived C++ project: standard C headers like stdio.h and math.h now have their own place in the C++ standard as resp. cstdio, cmath, and so on. In this branch the #include names are updated for the mert/ subdirectory; more branches to follow. C++11 adds cstdint, but to support compilation with the previous standard, that change is left for later.
2015-01-14beautifyHieu Hoang
2014-09-24explicitly set BLEU as default scorer (for return-best-dev)Rico Sennrich
(evaluator doesn't accept --scconfig without --sctype)
2014-09-22(optionally) use n-best file for evaluator/return-best-devRico Sennrich
this adds support for metrics that rely on alignment / trees
2013-12-19moses windows build, with some TODO listjiejiang
2013-05-29beautifyHieu Hoang
2012-12-06Use util::TokenIter to tokenize n-best lists.Tetsuo Kiso
Reduce creating std::string objects, too. In both ScoreArray and FeatureArray classes, the private members to track sentence indices (namely, "m_index") were unnecessarily declared as std::string, but it's better to directly declare them as 'int'.
2012-07-01namespace all classes in mert directoryHieu Hoang
2012-05-09Added support for external unix filters to preprocess sentences in mert and ↵Matous Machacek
evaluator
2012-03-10Pass by pointers to Scorer instead of references.Tetsuo Kiso
2012-02-28Support for using factors in mert and evaluatorMatous Machacek
example: Use --factor "0|2" to use only first and third factor from nbest list and from reference. If you use interpolated scorer, separate records with comma (e.g. --factor "0|2,1").
2012-02-27Change of evaluator usage (see mert/evaluator --help).Matous Machacek
2012-02-01Create a struct for command line options in extractor.Tetsuo Kiso
2012-02-01Create a wrapper function to init seed.Tetsuo Kiso
Move g_bootstrap from a global variable to a member of struct ProgramOption.
2012-02-01Create a struct for command line options.Tetsuo Kiso
Add a wrapper function to parse the options, too.
2012-01-26Create a utility class for mert/evaluator.cpp to avoid name collisions, just ↵Tetsuo Kiso
in case. And introduce anonymous namespace for the class and global variables as well.
2012-01-26Add whitespaces.Tetsuo Kiso
2012-01-26Add prefixe 'g_' to global variables in mert/evaluator.cppTetsuo Kiso
While the size of mert/evaluator.cpp is still relatively small, adding the marker to the variables allows us to easily distinguish them from local variables.
2012-01-25mert/evaluator should now compute confidence interval correctlyMatous Machacek
2012-01-24fixed bugs in mert/evaluator, nicer printing of resultsMatous Machacek
2012-01-22mert/evaluator can compute more metrics at onceMatous Machacek
2011-11-14Minimize using #include headers in headers.Tetsuo Kiso
Should use it in .cpp files.
2011-11-12Small change: modify initialization of the Data class.Tetsuo Kiso
2011-11-12Fix indentation.Tetsuo Kiso
2011-11-11Fix memory leaks in mert.Tetsuo Kiso
2011-08-20Added evaluator to MERT directory. This tool computes a metric score for ↵machacekmatous
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