Commit Graph

18 Commits

Author SHA1 Message Date
Ulrich Germann
29694af6e4 Code cleanup and refactoring. 2015-12-11 01:09:22 +00:00
Ulrich Germann
fdb5d9b282 Code refactoring: All FF now get access to AllOptions at load time, so they don't have to rely on StaticData. 2015-12-08 12:56:55 +00:00
MosesAdmin
d757346b55 daily automatic beautifier 2015-10-19 00:00:40 +01:00
Ulrich Germann
bdb0227ee9 Life cycle of TargetPhraseCollection is now managed via shared pointers. 2015-10-18 21:27:58 +01:00
Ulrich Germann
e4f5c69109 One step closer to eliminating the requirement to provide num-features=... in the config file.
Some FF (Mmsapt, LexicalReordering, Many single-value FF) provide this number during "registration";
when missing, a default weight vector of uniform 1.0 is automatically generated. This eliminates the
need for the user to figure out what the exact number of features is for each FF, which can get complicated,
e.g. in the case of Mmsapt/PhraseDictionaryBitextSampling.
2015-04-29 20:16:52 +01:00
Jeroen Vermeulen
d56f317f2e New helper classes: temp_dir & temp_file.
I'm adding these because boost::filesystem::unique_path introduces
encoding issues: on Windows the path is in wchar_t, breaking use of
those strings in various places!  Encoding the strings is just too
much work.

It's still possible that the current temp_file implementation won't
build on Windows (it uses POSIX mkstemp() and close()) but that can
be fixed underneath the API.
2015-04-17 22:57:55 +07:00
Jeroen Vermeulen
ebc0930500 Replace use of tmpnam with boost::filesystem.
Silences a few annoying warnings from gcc: "tmpnam is dangerous" (and
the suggestion to use mkstemp instead).
2015-04-02 10:42:06 +07:00
Jeroen Vermeulen
b124d99330 Use boost::filesystem for "rm -rf".
Replaces a system() call (which was a portability problem) and fixes,
en passant, a warning about its return value being ignored.
2015-03-29 18:33:58 +07:00
Jeroen Vermeulen
a9c8f44896 Modernize "C" includes in moses.
This is one of those little chores in managing a long-lived C++
project: standard C headers like stdio.h and math.h now have their own
place in the C++ standard as resp. cstdio, cmath, and so on.  In this
branch the #include names are updated for the moses/ subdirectory; more
branches to follow.

C++11 adds cstdint, but to support compilation with the previous
standard, that change is left for later.
2015-03-28 20:09:03 +07:00
Hieu Hoang
05ead45e71 beautify 2015-01-14 11:07:42 +00:00
Hieu Hoang
efa5befb16 method rename 2014-08-08 15:59:34 +01:00
Hieu Hoang
e863592f40 TargetPhrase to have pointer to the phrase table that creates it 2014-08-04 19:28:04 +01:00
Hieu Hoang
2830ed9968 use Nadir's backoff code 2014-05-12 15:40:18 +01:00
Phil Williams
04dbd3c7aa moses_chart: more efficient scope-3 parsing if sentence length < max-chart-span 2014-03-14 08:49:09 +00:00
Hieu Hoang
50cadc754f use boost::unordered_map for CacheColl. Marginally faster 2014-02-11 03:43:58 +00:00
Hieu Hoang
e64368e7e4 Forgot to call SetFeaturesToApply() for SkeletonPT and Transliteration phrase table 2013-12-10 12:42:05 +00:00
Hieu Hoang
a5d0296699 make transliteration phrase table thread safe 2013-12-06 16:25:17 +00:00
Hieu Hoang
cc9ecdff0a rename TransliterationPhraseDictionary to PhraseDictionaryTransliteration 2013-12-05 13:13:01 +00:00