Commit Graph

24 Commits

Author SHA1 Message Date
Hieu Hoang
6249432407 beautify 2013-05-29 18:16:15 +01:00
Hieu Hoang
e3dd3a8d2c namespace all classes in mert directory 2012-06-30 20:23:45 +01:00
Tetsuo Kiso
7093d2e2cd Change mert/Timer.
- Add a high resolution timing function to measure the
  wall-clock time by gettimeofday().

- Now the Timer class use getrusage() to measure the elapsed
  CPU time as KenLM does.

- Revive Timer::restart().

- Add Timer::ToString() for reporting the detail statistics
  as well as for debugging.

- Add a simple unit test for Timer.
2012-02-27 08:34:51 +09:00
Tetsuo Kiso
82da44b030 Fix typo. 2012-02-20 08:29:53 +09:00
Tetsuo Kiso
a70925317e Put global variables in mert/util.cpp in anonymous space.
We do not allow clients to access the following variables.
Instead, use the APIs which we provide for that.

Also, remove the unused function, and fix smoke tests.
2012-02-20 08:02:23 +09:00
Tetsuo Kiso
5d1cfa0ebb Bug fix: tokenizer used in mert; add unit tests for that.
When tokenizing a string delimited by spaces (say, "9 9 8 7 ")
with Tokenize(), resulting a sequence of strings are
{"9", "9", "8", "7", "" }, which is different
from we have expected. We are not interested in empty strings.

This commit fix this issue, and add unit tests for
the tokenize functions.
2012-02-20 07:39:24 +09:00
Tetsuo Kiso
29c16d252a Minimize using #include headers in headers.
Should use it in .cpp files.
2011-11-14 15:15:30 +09:00
Tetsuo Kiso
be1506e759 Use passing objects by const references not passing by their values. 2011-11-14 14:00:47 +09:00
Tetsuo Kiso
8f0ba037f3 Add comments. 2011-11-13 21:13:44 +09:00
Tetsuo Kiso
ee0345b9b6 Move filestream wrapper classes to FileStream.{h,cpp} 2011-11-12 11:44:39 +09:00
Tetsuo Kiso
8e7693076c Add const to stream wrapper classes. 2011-11-12 11:35:20 +09:00
Tetsuo Kiso
ce9a628ed0 Remove unnecessary semicolons used in end of member functions. 2011-11-12 09:40:01 +09:00
Tetsuo Kiso
664ffe0130 Fix indentation. 2011-11-12 09:24:19 +09:00
Tetsuo Kiso
68315d6407 Fix class, function, and implementation comments format.
Functions comments should be placed in their declarations.
2011-11-12 08:58:23 +09:00
Tetsuo Kiso
888c47d921 Fix splitting strings from a string. 2011-11-11 22:00:30 +09:00
machacekmatous
642e8dce95 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
2011-08-20 15:25:19 +00:00
hieuhoang1972
148c1e8305 run beautify.perl. Consistent formatting for .h & .cpp files
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@3899 1f5c12ca-751b-0410-a591-d2e778427230
2011-02-24 12:42:19 +00:00
nicolabertoldi
4b4c1b3973 imported utilities for timing from Moses
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@1969 1f5c12ca-751b-0410-a591-d2e778427230
2009-01-07 13:30:06 +00:00
nicolabertoldi
281bf610b8 added binary read/load facility for feature data
added names of features in the header
added methods to access the features by name


git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@1819 1f5c12ca-751b-0410-a591-d2e778427230
2008-06-05 07:23:34 +00:00
jfouet
8e54557e9f fix crash in getNextPound
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@1814 1f5c12ca-751b-0410-a591-d2e778427230
2008-06-04 08:32:19 +00:00
nicolabertoldi
c9593648bb change from int to unsigned where needed
add some debugging output (to remove later)

git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@1794 1f5c12ca-751b-0410-a591-d2e778427230
2008-05-23 11:48:16 +00:00
nicolabertoldi
8a594fc254 reading from textual gzipped file is now possible
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@1786 1f5c12ca-751b-0410-a591-d2e778427230
2008-05-20 14:15:30 +00:00
jfouet
bb42cb0dd5 bugfixes+ introduction of verbose level
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@1723 1f5c12ca-751b-0410-a591-d2e778427230
2008-05-16 07:09:15 +00:00
nicolabertoldi
49891adeed I am starting the improvement of Minimum Error Training scritps
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@1632 1f5c12ca-751b-0410-a591-d2e778427230
2008-05-14 07:57:45 +00:00