Commit Graph

138 Commits

Author SHA1 Message Date
Tetsuo Kiso
20e27aab92 Refactoring: constructors and copying objects. 2011-11-12 18:12:07 +09:00
Tetsuo Kiso
87a5c16b55 Replace macros with const variables and inline functions. 2011-11-12 17:30:33 +09:00
Tetsuo Kiso
ae9701ff77 Fix initialization of score_, and add destructor. 2011-11-12 16:50:18 +09:00
Tetsuo Kiso
df0874df89 Make Point::score a private by defining accessor/mutator. 2011-11-12 16:39:57 +09:00
Tetsuo Kiso
fdcd148cac Replace macros with const char arrays used in XXXArray classes. 2011-11-12 12:13:35 +09:00
Tetsuo Kiso
03abf54d21 Add a utility function to make sure the filename with ".gz" extension. 2011-11-12 11:50:39 +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
fb3b0f9f62 Add const to Data and Feature class members. 2011-11-12 11:26:13 +09:00
Tetsuo Kiso
54b3b846c7 Add const member functions in Scorer classes. 2011-11-12 10:58:14 +09:00
Tetsuo Kiso
00b8c6d768 Use const Scorer::calculateScore(). 2011-11-12 10:40:54 +09:00
Tetsuo Kiso
1ec58e7edf Fix constructors and initializing const members. 2011-11-12 10:28:08 +09:00
Tetsuo Kiso
d776281b8b Simple refactoring of BLEU scorer. 2011-11-12 10:21:08 +09:00
Tetsuo Kiso
43beb88df5 Fix constructors of scorer classes and optimizer classes.
Using public const members is not good idea.
It should be initialized in private by constructors.
2011-11-12 10:16:31 +09:00
Tetsuo Kiso
fdb83b0f6d Put constructor and destructor into private for Factory class 2011-11-12 09:56:21 +09:00
Tetsuo Kiso
dfb714296f Add 'explicit' for constructors with one argument. 2011-11-12 09:51:27 +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
0fc56ae869 Add a comment to mark the end of #define guard. 2011-11-12 09:16:05 +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
4f6d022fe7 Add comments to mark the end of #define guards. 2011-11-12 07:59:50 +09:00
Tetsuo Kiso
888c47d921 Fix splitting strings from a string. 2011-11-11 22:00:30 +09:00
Tetsuo Kiso
c2121695c2 Fix memory leaks in mert. 2011-11-11 20:40:59 +09:00
Tetsuo Kiso
087756b8c3 Fix memory leaks in extractor. 2011-11-11 20:02:26 +09:00
Kenneth Heafield
1c4be5675c Lines are better when they end 2011-11-07 17:08:19 +00:00
bhaddow
7c0d9c34da Fix formatting of pro input file
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@4360 1f5c12ca-751b-0410-a591-d2e778427230
2011-10-14 14:01:15 +00:00
bhaddow
718c55d3aa Reducing memory usage for sparse features
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@4355 1f5c12ca-751b-0410-a591-d2e778427230
2011-10-14 07:40:53 +00:00
servan
eef0f213e9 A mert/MergeScorer.h
A    mert/MergeScorer.cpp


git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@4303 1f5c12ca-751b-0410-a591-d2e778427230
2011-10-06 11:00:48 +00:00
servan
f223f5a276 M mert/TerScorer.cpp
M    mert/BleuScorer.h
M    mert/ScorerFactory.h
M    mert/Scorer.h
M    mert/PerScorer.h
M    mert/TerScorer.h
M    mert/Makefile.am
AM   scripts/training/mert-moses-multi.pl


git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@4299 1f5c12ca-751b-0410-a591-d2e778427230
2011-10-05 13:36:17 +00:00
bhaddow
fc695c38a7 Implementation of sharding and resampling in mert.
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@4226 1f5c12ca-751b-0410-a591-d2e778427230
2011-09-15 17:45:35 +00:00
servan
c55b03dd66 M TerScorer.cpp
M    TerScorer.h


git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@4206 1f5c12ca-751b-0410-a591-d2e778427230
2011-09-09 13:26:45 +00:00
bhaddow
0955474dea remove old tests
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@4195 1f5c12ca-751b-0410-a591-d2e778427230
2011-09-08 18:04:13 +00:00
bhaddow
ed8d85acc1 moving mert tests
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@4193 1f5c12ca-751b-0410-a591-d2e778427230
2011-09-08 17:51:09 +00:00
phkoehn
41a1849437 support for sparse feature functions (mert support only when using PRO)
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@4184 1f5c12ca-751b-0410-a591-d2e778427230
2011-09-07 16:37:33 +00:00
bhaddow
9fee4a97f2 clean-up
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@4183 1f5c12ca-751b-0410-a591-d2e778427230
2011-09-07 08:36:08 +00:00
bhaddow
ca5c0f19b7 Multi-threading of mert, for random restarts.
Fix mert tests.


git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@4182 1f5c12ca-751b-0410-a591-d2e778427230
2011-09-07 08:08:35 +00:00
bhaddow
37ebe7a62e Build common files into archive so we don't have to compile them 3 times
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@4179 1f5c12ca-751b-0410-a591-d2e778427230
2011-09-06 12:29:18 +00:00
machacekmatous
1daacfbb72 TER Scorer sources cleaned, compilable without boost now. TER Scorer added back to the default built.
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@4173 1f5c12ca-751b-0410-a591-d2e778427230
2011-09-05 22:26:18 +00:00
bhaddow
1786d33e0f Make ter scoring optional
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@4172 1f5c12ca-751b-0410-a591-d2e778427230
2011-09-05 16:23:46 +00: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
machacekmatous
63fd490a51 Added CDER metric to use in MERT.
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@4152 1f5c12ca-751b-0410-a591-d2e778427230
2011-08-18 21:35:16 +00:00
bojar
998b86f639 addind a TODO list for anyone, esp. Matous Machacek
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@4150 1f5c12ca-751b-0410-a591-d2e778427230
2011-08-17 10:01:14 +00:00
machacekmatous
3ef02eb7e6 merged in TER Scorer from mert-other_metrics (at r4140)
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@4146 1f5c12ca-751b-0410-a591-d2e778427230
2011-08-16 16:21:31 +00:00
phkoehn
36db0ffe48 added pairwise ranked optimization (PRO) as proposd by [Hopkins&May,2011], just use switch --pairwise-ranked
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@4106 1f5c12ca-751b-0410-a591-d2e778427230
2011-08-03 17:00:17 +00:00
phkoehn
1bd74fc87f added random directions [Cer&al.,2008] and historic best as starting points [Foster&Kuhn,2009] to MERT
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@4086 1f5c12ca-751b-0410-a591-d2e778427230
2011-07-23 00:24:45 +00:00
bojar
1ba2de3c02 - cmert: added support for passing min and max values for weights
(used to be in old cmert but not in new cmert, i.e. moses/mert/)
- modified mert-moses.pl accordingly, esp. set min&max to 0&1 as it used to be
  hardwired in the new cmert
- adding mert-moses-ondrej.pl, a simplification of mert-moses.pl, please test it


git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@4066 1f5c12ca-751b-0410-a591-d2e778427230
2011-07-03 21:01:16 +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
rsennrich
ec00f9a916 fix to MERT: disable normaliziation when optimizing subset of features.
before, active features were normalized to 1; optimizing one feature would always set it to 1, preventing any real optimization.

git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@3845 1f5c12ca-751b-0410-a591-d2e778427230
2011-01-25 16:10:47 +00:00
bhaddow
2e77dce57e improvement to error message
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@3763 1f5c12ca-751b-0410-a591-d2e778427230
2010-12-08 10:13:19 +00:00
bhaddow
6e8856edc2 Prevent intersections going to infinity
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@3125 1f5c12ca-751b-0410-a591-d2e778427230
2010-04-12 14:31:10 +00:00