Commit Graph

207 Commits

Author SHA1 Message Date
Tetsuo Kiso
905f959d83 Move funcions defined in a header into .cpp file. 2012-02-01 21:44:37 +09:00
Tetsuo Kiso
b2987337d8 Remove virtual keyword from whoami() function.
The funtion is neither inherited from Scorer nor
StatisticsBasedScorer.
2012-02-01 21:36:25 +09:00
Tetsuo Kiso
923efa0a4c Move funcionts used in StatisticsBasedScorer into anonymous namespace.
And add 'inline' keyword to the functions.
2012-02-01 21:30:50 +09:00
Tetsuo Kiso
5cd5b90d0d Create a initialize function. 2012-02-01 21:26:47 +09:00
Tetsuo Kiso
17e864e446 Create private class to encapssulate encoding process.
Instead of using typedefs inside a class only,
it might be better to create a private class to do same things.
2012-02-01 21:19:25 +09:00
Tetsuo Kiso
a351a74c18 Move regularizaion type into StatisticsBasedScorer.
The type is used as internal purpose.
2012-02-01 20:58:49 +09:00
Tetsuo Kiso
b19e7777ce Add prefix 'm_' to private and protected members in Scorer classes. 2012-02-01 20:54:20 +09:00
Tetsuo Kiso
33cea0f1dc Delete unused enums. 2012-02-01 20:26:25 +09:00
Tetsuo Kiso
30fa97e404 Move reference length type into a private member of BleuScorer.
The reason is that the type is used as internal purpose.
2012-02-01 20:24:48 +09:00
Tetsuo Kiso
d742341176 Bug fix: memory leak issues when using MergeScorer. 2012-02-01 18:13:32 +09:00
Tetsuo Kiso
3ef03a77c4 Change casts to C++ style casts. 2012-02-01 18:13:00 +09:00
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
8e1bf6d7d1 Pass std::string objects by const reference instead of by value. 2012-02-01 16:46:36 +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
Tetsuo Kiso
c94b1f8ff0 Add whitespaces. 2012-02-01 12:29:45 +09:00
Tetsuo Kiso
cad03f7a03 Create a struct for command line options in extractor. 2012-02-01 12:23:15 +09:00
Tetsuo Kiso
4d3fd9fd4b Create a wrapper function to init seed.
Move g_bootstrap from a global variable to
a member of struct ProgramOption.
2012-02-01 11:49:26 +09:00
Tetsuo Kiso
1452f88ed5 Create a struct for command line options.
Add a wrapper function to parse the options, too.
2012-02-01 11:27:17 +09:00
Tetsuo Kiso
037af96a6e Create a utility class for mert/evaluator.cpp to avoid name collisions, just in case.
And introduce anonymous namespace for the class and global variables
as well.
2012-01-27 04:06:36 +09:00
Tetsuo Kiso
940dadaa4c Add whitespaces. 2012-01-27 03:39:13 +09:00
Tetsuo Kiso
f9eac588e7 Add prefixe 'g_' to global variables in mert/evaluator.cpp
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-27 03:24:51 +09:00
Matous Machacek
5254e7917b mert/evaluator should now compute confidence interval correctly 2012-01-24 21:25:15 +01:00
Matous Machacek
6cbdfc513b fixed bugs in mert/evaluator, nicer printing of results 2012-01-24 19:18:44 +01:00
Matous Machacek
b4a50ec50b mert/evaluator can compute more metrics at once 2012-01-22 01:01:08 +01:00
cservan
fa107dda85 Fix the memory overflow 2011-12-23 11:14:34 +01:00
Hieu Hoang
575168c277 uint -> size_t 2011-12-12 23:27:27 +07:00
Hieu Hoang
753eebd959 revert 2011-12-12 20:48:42 +07:00
Tetsuo Kiso
442ddb7458 Pass by reference. 2011-12-08 14:18:37 +09:00
Tetsuo Kiso
61568a602d Add explicit 2011-12-08 14:17:39 +09:00
Kenneth Heafield
c53453b266 No more autotools (with bhaddow in the room) 2011-12-01 17:17:28 +00:00
Tetsuo Kiso
4d189eb14d Fix a typedef for comparing N-grams.
Declared const_iterator was not *const* actually.
2011-11-30 00:27:57 +09:00
Kenneth Heafield
f564876e5e Avoid naming conflict with glibc's libutil 2011-11-28 09:19:45 +00:00
Kenneth Heafield
a7222a322d Regression tests expect mert in mert/ 2011-11-25 22:14:04 +00:00
Kenneth Heafield
463f2e232e Link dynamically against libz if we have to 2011-11-21 15:09:38 +00:00
Kenneth Heafield
f15eee0abf Jam: Clean up boost library handling, assimilate mert 2011-11-18 11:27:57 -05:00
Kenneth Heafield
bf78f7a1ac Replace assert with CHECK until people learn how to use assert properly 2011-11-18 12:07:41 +00:00
Rico Sennrich
57bbf82c27 broken/obsolete 2011-11-18 10:49:34 +01: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
Barry Haddow
aeead91b54 Output to file. Remove debug. 2011-11-16 16:26:01 +00:00
Barry Haddow
79de3c8699 Complete initial version of pro extractor 2011-11-16 14:54:23 +00:00
Tetsuo Kiso
d7bd58c6f5 Resolved conflicts 2011-11-15 22:41:21 +09:00