Nicola Bertoldi
e452a13062
beautify
2014-01-15 16:49:57 +01:00
Hieu Hoang
d9be81596e
replace CHECK with UTIL_THROW_IF in mert
2013-11-18 18:13:10 +00:00
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
408dd72f9d
Pass by reference instead of returning objects.
...
In the previous implementation, copy-constructor got called, which
was not necessary. This commit prevents it, making code more efficient.
2012-04-12 09:40:52 +09:00
Tetsuo Kiso
0e9b5fd9d0
Add const to return values of overloaded operators.
...
* This commit prevents developers from doing mistakes like:
Point p1, p2, p4;
if (p1 + p2 = p4) { // Bang! We actually wanted to compare
// the result of two points: (p1 + p2 == p4).
// do something.
}
See, e.g., http://www.gotw.ca/gotw/006.htm for details.
* Add more test cases according to this change.
* Move a helper function to compare floating point numbers
to Util.h.
2012-04-12 09:16:27 +09:00
Tetsuo Kiso
49a4be2899
Reduce the number of calling the numeric_limits constructor.
...
- Create a test module for Point.
- Add test cases.
2012-04-12 05:19:11 +09:00
Tetsuo Kiso
e7a2483b22
mert: Prefix private members with "m_" except TER.
...
Squashed commit of the following:
- Clean up PRO.
- Clean up ScoreStats.
- Clean up ScoreData.
- Clean up ScoreArray.
- Remove unnecessary headers.
- Clean up ScopedVector.
- Clean up Point.
- Clean up PerScorer.
- Clean up Optimizer.
- Clean up MergeScorer.
- Clean up InterpolatedScorer.
- Clean up FileStream.
- Clean up FeatureStats.
- Remove inefficient string concatenation.
- Clean up FeatureData.
- Clean up FeatureArray.
- Clean up Data.
2012-03-10 17:12:34 +09:00
Tetsuo Kiso
6d6fb4383d
Fix a mistake in a previous commit: tuning on a subset of features.
...
In the commit 4b6232b757
,
I thought I had fixed the bug around the tuning on a subset of
features by checking whether pdim and the length of the
active features which you want to optimize in the tuning.
However, it was wrong. I should set Point::optindices
appropriately according to specified the subset.
2012-02-28 00:35:42 +09:00
Tetsuo Kiso
142342f8be
Change casts to C++ style casts, and delete unnecessary casts.
2012-02-01 17:17:58 +09:00
Kenneth Heafield
bf78f7a1ac
Replace assert with CHECK until people learn how to use assert properly
2011-11-18 12:07:41 +00:00
Tetsuo Kiso
2fde1cab0e
Add missing headers.
2011-11-14 19:52:21 +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
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
ce9a628ed0
Remove unnecessary semicolons used in end of member functions.
2011-11-12 09:40:01 +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
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
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
nicolabertoldi
1a90b6a915
changing the randomize function -from rand() to random()- to have the same behavior of linux machine also on mac; changing the regression test accordingly
...
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@2554 1f5c12ca-751b-0410-a591-d2e778427230
2009-10-01 14:08:22 +00:00
bhaddow
bb9e2f427d
Fix random restarts so that they are actually random, using the system clock
...
for seeding.
Previously, new mert followed old mert in using the same set of "random" points
for every iteration of the outer loop.
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@2126 1f5c12ca-751b-0410-a591-d2e778427230
2009-02-12 12:58:27 +00:00
nicolabertoldi
291260abf7
- made output more compliant with old version
...
- added PerSCorer.h and BleuScorer.h
- stored feature names
- fixed bug about output of best Point
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@1796 1f5c12ca-751b-0410-a591-d2e778427230
2008-05-27 16:50:52 +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
09b5a0a282
modified log outputs to e comliant with old mert
...
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@1792 1f5c12ca-751b-0410-a591-d2e778427230
2008-05-21 16:52:00 +00:00
jfouet
e9df80a05c
bugfixes
...
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@1726 1f5c12ca-751b-0410-a591-d2e778427230
2008-05-16 10:57:24 +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
jfouet
b231ffc8b1
add Types.h to unify the typedefs
...
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@1713 1f5c12ca-751b-0410-a591-d2e778427230
2008-05-15 19:09:01 +00:00
jfouet
b0ee845d7e
various small fixes
...
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@1702 1f5c12ca-751b-0410-a591-d2e778427230
2008-05-15 14:17:34 +00:00
jfouet
c66aec9e83
implementation of the main
...
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@1698 1f5c12ca-751b-0410-a591-d2e778427230
2008-05-15 14:04:42 +00:00
jfouet
bfe3661110
implementation of optimization on a subset of the parameters + debug mode in the makefile
...
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@1695 1f5c12ca-751b-0410-a591-d2e778427230
2008-05-15 10:57:20 +00:00
jfouet
cb5305ab46
implementation of LineOptimizer
...
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@1659 1f5c12ca-751b-0410-a591-d2e778427230
2008-05-14 14:25:07 +00:00
jfouet
43ba7835bb
class to inplement a set of lambda parameter and their stat score
...
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@1642 1f5c12ca-751b-0410-a591-d2e778427230
2008-05-14 11:32:17 +00:00