Commit Graph

43 Commits

Author SHA1 Message Date
Ulrich Germann
2be2481feb Added switch --daemon: fork and run moses server in background. The parent won't exit until the child is ready to serve. 2015-12-07 16:01:12 +00:00
Ulrich Germann
48999749ec Unused variable. 2015-11-29 17:56:27 +00:00
David Madl
3b63930943 move global Timer to Timer.h
Move ResetUserTime(), PrintUserTime(), GetUserTime() to Timer.h

Do not reset timer in StaticData.
2015-11-17 16:15:13 +00:00
Ulrich Germann
9826599cb0 Enforce const-ness of command line arguments; bug fix in mosesserver.cpp. 2015-11-11 01:08:05 +00:00
Hieu Hoang
bd4755a7fe compile error without XMLRPC-C 2015-11-06 09:44:52 -05:00
Ulrich Germann
ec1ef78d51 Reduction in number of #ifdef HAVE_XMLRPC_C, as per Hieu's request. 2015-11-04 18:12:49 +00:00
Hieu Hoang
9b56e63d51 eclipse. And more #ifdef HAVE_XMLRPC_C 2015-11-03 19:00:58 +00:00
MosesAdmin
4168429aac daily automatic beautifier 2015-10-31 17:14:47 +00:00
Ulrich Germann
6a2e6feeed Context weights now live in the ContextScope, not any more on TranslationTask.
TargetPhrase now has weak ptr to ContextScope, not to TranslationTask any more,
because TargetPhrases can outlive the scope of a Translation Task.
2015-10-28 10:26:41 +00:00
Ulrich Germann
13f2af7399 Merge branch 'master' of http://github.com/moses-smt/mosesdecoder
Conflicts:
	moses/SearchCubePruning.cpp
	moses/SearchNormal.cpp
2015-08-09 21:12:30 +01:00
MosesAdmin
0045a74980 daily automatic beautifier 2015-08-09 00:00:45 +01:00
Hieu Hoang
243148b848 compile error without xmlrpc-c lib 2015-08-08 16:27:56 +04:00
MosesAdmin
21aa5af640 daily automatic beautifier 2015-08-08 00:00:45 +01:00
Ulrich Germann
fd4e946ddc Emacs code formatting settings. 2015-08-07 19:14:21 +01:00
Ulrich Germann
fc10ad4afb Code reorganization for better session management in Moses server. Clients can now close sessions. 2015-08-04 01:59:28 +01:00
Ulrich Germann
511de3674e Reorganization of server options. 2015-08-02 21:26:54 +01:00
Ulrich Germann
faaf0bdf87 Reorganization of server options. Added options for sesssion cache. 2015-08-01 16:11:35 +01:00
Ulrich Germann
2090640d4d xmlrpc-c server log file now defaults to /dev/null instead of empty string 2015-07-31 23:16:02 +00:00
Ulrich Germann
d67723fd29 Merge branch 'master' of http://github.com/moses-smt/mosesdecoder into ranked-sampling
Conflicts:
	moses/TargetPhrase.cpp
	moses/TargetPhrase.h
2015-07-28 14:29:49 +01:00
MosesAdmin
ce62565647 daily automatic beautifier 2015-07-22 00:00:54 +01:00
Ulrich Germann
5aaa8fcbfa 1. Fixed concurrency issue in context handling.
2. Added phrase table feature function PScoreLengthRatio.
2015-07-21 15:36:28 +01:00
Hieu Hoang
c989b8f34a apply Pidong Wang's patch for server to new server code in moses/ 2015-07-21 16:46:32 +04:00
Ulrich Germann
98c03dc047 Merge branch 'mmt-dev' into ranked-sampling.
Conflicts:
	moses/TranslationModel/UG/mm/ug_bitext.h
	moses/TranslationModel/UG/mm/ug_bitext_jstats.cc
	moses/TranslationModel/UG/mm/ug_bitext_jstats.h
	moses/TranslationModel/UG/mm/ug_bitext_pstats.cc
	moses/TranslationModel/UG/mm/ug_sampling_bias.cc
	moses/TranslationModel/UG/mm/ug_sampling_bias.h
2015-07-03 15:30:33 +01:00
XapaJIaMnu
69c1308f01 Add context_weights parameter to command line 2015-06-23 15:02:15 +01:00
Ulrich Germann
4582e43473 Merge branch 'master' into ranked-sampling 2015-06-08 15:45:04 +01:00
Ulrich Germann
2b7137b548 Changes to how the context scope is set. 2015-06-08 11:44:03 +01:00
Hieu Hoang
efdb8566b1 delete ChangeSource(). Not used 2015-06-02 21:00:32 +04:00
Jeroen Vermeulen
0859e9a844 Remove trailing whitespace from C++ files. 2015-05-13 17:05:43 +07:00
Ulrich Germann
7da7ce52da Added context buffering in IOWrapper for context-sensitive decoding.
Unfortunately, this seems to slow things down quite a bit.
2015-05-11 00:34:24 +01:00
Hieu Hoang
cc8c6b7b10 beautify 2015-05-02 11:45:24 +01:00
Jeroen Vermeulen
eca5824100 Remove trailing whitespace in C++ files. 2015-04-30 12:05:11 +07:00
Ulrich Germann
8b2e5ea0be No try { ... } catch { ... } in debug mode. 2015-04-29 20:07:03 +01:00
Ulrich Germann
0d72cdd72c Merge branch 'master' of https://github.com/moses-smt/mosesdecoder into mmt-dev
Conflicts:
	moses/Syntax/F2S/Manager-inl.h
	moses/TranslationModel/UG/mmsapt.cpp
2015-04-26 02:12:16 +01:00
Jeroen Vermeulen
38d790cac0 Add cross-platform randomizer module.
The code uses two mechanisms for generating random numbers: srand()/rand(),
which is not thread-safe, and srandom()/random(), which is POSIX-specific.

Here I add a util/random.cc module that centralizes these calls, and unifies
some common usage patterns.  If the implementation is not good enough, we can
now change it in a single place.

To keep things simple, this uses the portable srand()/rand() but protects them
with a lock to avoid concurrency problems.

The hard part was to keep the regression tests passing: they rely on fixed
sequences of random numbers, so a small code change could break them very
thoroughly.  Util::rand(), for wide types like size_t, calls std::rand() not
once but twice.  This behaviour was generalized into utils::wide_rand() and
friends.
2015-04-23 23:46:04 +07:00
Ulrich Germann
93ce2423df 1. A context string for biased sampling in Mmsapt can now be provided on the
command line with --context-string. Not available in server mode yet.
2. Numerous bug fixes related to biased sampling.
3. Biased sampling now checks that the sampling sticks to the bias. If
   the distribution of samples deviates too much from the bias, samples
   whose selection would push the sample distribution even further from the bias
   are not considered, even if that means that fewer samples are chosen in total.
2015-04-03 16:16:52 +01:00
Ulrich Germann
ddf7bc3e23 1. Added FeatureFunction::Setup(TranslationTask const&) const to allow FFs to set themselves up for specific input.
2. FeatureFunction::ChangeSource should not be allow to change the pointer to the source.
2015-03-21 17:09:41 +00:00
Ulrich Germann
8ca11d941d 1. Lifetime of tasks in ThreadPool is now managed via shared pointers.
2. Code cleanup in IOWrapper and a bit elsewhere.
2015-03-21 16:12:52 +00:00
Ulrich Germann
e40fbbc2cb Added pragma to tell me if Moses is built with server functionality at compilation time. 2015-03-20 18:45:46 +00:00
Ulrich Germann
058abc32c3 Fixes (?) numerous bugs discovered when the code was actually compiled (an error in the bjam configuration prevented this). 2015-03-18 13:46:15 +00:00
Kenneth Heafield
54304fd473 Merge branch 'master' of https://github.com/moses-smt/mosesdecoder
Conflicts:
	moses/ExportInterface.cpp
2015-03-11 17:43:48 -04:00
James Zhang
23704613de added a simple translation interface 2015-03-11 17:33:17 -04:00
Ulrich Germann
982286b38f Folded contrib/server/mosesserver.cpp into the moses executable.
With immediate effect, mosesserver is deprecated, use moses --server instead.
2015-03-04 00:07:11 +00:00
James Zhang
8b61f396a7 Simple structure change to make moses main() function available in libmoses.a 2015-02-05 14:43:45 -05:00