Commit Graph

14 Commits

Author SHA1 Message Date
Ulrich Germann
623eb7bb77 Instantiation of btfix via boost::intrusive_ptr in Mmsapt.
This is in preparation for distinct bitext samplers which need to
ensure the lifetime of the bitext while sampling.
2015-06-05 21:15:47 +01:00
Ulrich Germann
576c743aee Simplified #include. 2015-06-05 16:22:03 +01:00
Ulrich Germann
5cb1d95e09 Added member function for retrieving nbest list items without sorting. 2015-06-05 16:21:09 +01:00
Ulrich Germann
d62d2dc95f Bug fix. 2015-06-01 23:10:50 +01:00
Ulrich Germann
aa4eed93d5 Bug fix related to getting rid of using namespace std; . 2015-06-01 18:55:40 +01:00
Jeroen Vermeulen
eca5824100 Remove trailing whitespace in C++ files. 2015-04-30 12:05:11 +07: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
Hieu Hoang
70e8eb54ce Using boost for prefix/suffix checks /Jeroen Vermeulen 2015-02-05 16:23:47 +00:00
Ulrich Germann
cef6460981 Initial check-in. 2014-09-08 09:26:08 +01:00
Ulrich Germann
90c91ae9bb Added fakelib stringdist. 2014-09-08 09:26:08 +01:00
Ulrich Germann
4d41211c2c Major overhaul of Mmsapt. Reorganization of old and addition of new features in phrase tables. Many critical bug fixes. 2014-07-09 02:41:28 +01:00
germann
5ec4436b07 Initial check-in. 2014-03-24 12:33:17 +00:00
Hieu Hoang
dbaabb1985 move Uli's new pt into it's own folder. Comment out bjam compile. Doesn't work on MacOSX yet 2013-09-26 12:16:03 +01:00
Hieu Hoang
4285a6c7df move Uli's new pt into it's own folder. Comment out bjam compile. Doesn't work on MacOSX yet 2013-09-26 10:10:12 +01:00