Commit Graph

49 Commits

Author SHA1 Message Date
Tetsuo Kiso
142342f8be Change casts to C++ style casts, and delete unnecessary casts. 2012-02-01 17:17:58 +09:00
Tetsuo Kiso
3c04b7e826 Create a function to save final weights to a file. 2012-02-01 16:59:48 +09:00
Tetsuo Kiso
1bafc99ea2 Use a constant instead of hard-coding. 2012-02-01 16:51:25 +09:00
Tetsuo Kiso
b399dfc906 Rename too short variables.
'D' and 'O' is hard to find when you might want to
search by command line tools such as grep.
2012-02-01 16:39:38 +09:00
Tetsuo Kiso
8007150db4 Add constans to prevent avoid hard coding many times.
Default filenames in usage() were differen from the actual ones.
2012-02-01 16:33:23 +09:00
Tetsuo Kiso
c3fbe5081e Add whitespaces. 2012-02-01 16:15:22 +09:00
Tetsuo Kiso
e8823d5015 Add 'virtual' keyword for functions in OptimizationTask.
Adding 'virtual' keyword for an inherited virtual function is good
practice because it will let the users know where the function
comes from.
2012-02-01 15:49:33 +09:00
Tetsuo Kiso
c1c9c1c8bb Create a struct for command line options in mert. 2012-02-01 15:21:49 +09:00
Tetsuo Kiso
616b014554 Delete unused variables. 2012-02-01 12:37:41 +09:00
Tetsuo Kiso
bb9a6b9184 Introduce anonymous namespace. 2012-02-01 12:35:50 +09:00
Hieu Hoang
753eebd959 revert 2011-12-12 20:48:42 +07:00
Barry Haddow
ba5633c7b5 Merge remote branch 'origin/master' into pro
Conflicts:
	kenlm
	mert/Data.cpp
	mert/Data.h
	mert/Makefile.am
	mert/mert.cpp
2011-11-17 15:58:56 +00:00
Barry Haddow
71c777f01d Remove old PRO. Fix running of PRO from mert script. 2011-11-16 17:43:54 +00:00
Tetsuo Kiso
0c7a38d9d2 Prohibit the client from calling some constructors without arguments.
The reason is to avoid the misuse of constructors that should be called
with arguments.
2011-11-14 12:58:42 +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
Tetsuo Kiso
c2121695c2 Fix memory leaks in mert. 2011-11-11 20:40:59 +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
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
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
nicolabertoldi
e0ae1ad605 now it is possible to perform mert on a subset of features
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@2645 1f5c12ca-751b-0410-a591-d2e778427230
2010-01-08 15:12:28 +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
nicolabertoldi
0393183eb4 mert software now works with different reference length policies: shortest, average, closest (default) and with case information (default is preserving case). Pay attention that both defaults are different from the previous version (which were shortest reflen and case-insensitive).
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@2459 1f5c12ca-751b-0410-a591-d2e778427230
2009-08-05 15:38:35 +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
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
32029561da mert can now load more data files
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@1942 1f5c12ca-751b-0410-a591-d2e778427230
2008-11-18 18:51:02 +00:00
bhaddow
83f234cf17 Implementation of Cer et al mert regularisation. Use with argument such
as --scconfig regtype:min,regwin:3 in extractor and mert. Only tested
on toy example so far.


git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@1860 1f5c12ca-751b-0410-a591-d2e778427230
2008-06-24 19:27:18 +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
nicolabertoldi
f87b4261cf I fixed a small bug when reading parameters
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@1789 1f5c12ca-751b-0410-a591-d2e778427230
2008-05-21 10:03:48 +00:00
bhaddow
74fb532e00 Option to use random optimiser
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@1781 1f5c12ca-751b-0410-a591-d2e778427230
2008-05-17 12:19:02 +00:00
bhaddow
4ec448b3f2 Command line arg tidy up in extractor
Remove buffers from feature


git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@1761 1f5c12ca-751b-0410-a591-d2e778427230
2008-05-16 19:57:01 +00:00
bhaddow
1512abb7bd Save correct weight set!
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@1750 1f5c12ca-751b-0410-a591-d2e778427230
2008-05-16 16:51:39 +00:00
jfouet
2b07443683 bugfixes
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@1740 1f5c12ca-751b-0410-a591-d2e778427230
2008-05-16 14:21:24 +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
ad79af41df bug fixes
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@1719 1f5c12ca-751b-0410-a591-d2e778427230
2008-05-15 20:49:49 +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
94d47101ca add (almost empty) main
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@1696 1f5c12ca-751b-0410-a591-d2e778427230
2008-05-15 11:06:32 +00:00