mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-12-28 14:32:38 +03:00
minor gcc compile error.
also, no longer use IRSTLM as a subsitutute for SRILM, and vice versa. They don't give identitcal results - avoids confusion. git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@1229 1f5c12ca-751b-0410-a591-d2e778427230
This commit is contained in:
parent
b62dda41ed
commit
6b611279d5
@ -55,20 +55,11 @@ namespace LanguageModelFactory
|
|||||||
lm = new LanguageModelSRI(true, scoreIndexManager);
|
lm = new LanguageModelSRI(true, scoreIndexManager);
|
||||||
#elif LM_INTERNAL
|
#elif LM_INTERNAL
|
||||||
lm = new LanguageModelInternal(true, scoreIndexManager);
|
lm = new LanguageModelInternal(true, scoreIndexManager);
|
||||||
#elif LM_IRST
|
|
||||||
// shouldn't really do this. the 2 lm are not compatible
|
|
||||||
lm = new LanguageModelIRST(true, scoreIndexManager);
|
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
case IRST:
|
case IRST:
|
||||||
#ifdef LM_IRST
|
#ifdef LM_IRST
|
||||||
lm = new LanguageModelIRST(true, scoreIndexManager);
|
lm = new LanguageModelIRST(true, scoreIndexManager);
|
||||||
#elif LM_SRI
|
|
||||||
// shouldn't really do this. the 2 lm are not compatible
|
|
||||||
lm = new LanguageModelSRI(true, scoreIndexManager);
|
|
||||||
#elif LM_INTERNAL
|
|
||||||
// shouldn't really do this. the 2 lm are not compatible
|
|
||||||
lm = new LanguageModelInternal(true, scoreIndexManager);
|
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
case Skip:
|
case Skip:
|
||||||
@ -80,23 +71,17 @@ namespace LanguageModelFactory
|
|||||||
lm = new LanguageModelSkip(new LanguageModelInternal(false, scoreIndexManager)
|
lm = new LanguageModelSkip(new LanguageModelInternal(false, scoreIndexManager)
|
||||||
, true
|
, true
|
||||||
, scoreIndexManager);
|
, scoreIndexManager);
|
||||||
#elif LM_IRST
|
|
||||||
// shouldn't really do this. the 2 lm are not compatible
|
|
||||||
lm = new LanguageModelSkip(new LanguageModelIRST(false, scoreIndexManager)
|
|
||||||
, true
|
|
||||||
, scoreIndexManager);
|
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
case Joint:
|
case Joint:
|
||||||
#ifdef LM_SRI
|
#ifdef LM_SRI
|
||||||
lm = new LanguageModelJoint(new LanguageModelSRI(false), true);
|
lm = new LanguageModelJoint(new LanguageModelSRI(false, scoreIndexManager)
|
||||||
|
, true
|
||||||
|
, scoreIndexManager);
|
||||||
#elif LM_INTERNAL
|
#elif LM_INTERNAL
|
||||||
lm = new LanguageModelJoint(new LanguageModelInternal(false, scoreIndexManager)
|
lm = new LanguageModelJoint(new LanguageModelInternal(false, scoreIndexManager)
|
||||||
, true
|
, true
|
||||||
, scoreIndexManager);
|
, scoreIndexManager);
|
||||||
#elif LM_IRST
|
|
||||||
// shouldn't really do this. the 2 lm are not compatible
|
|
||||||
lm = new LanguageModelJoint(new LanguageModelIRST(false), true);
|
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
case Internal:
|
case Internal:
|
||||||
|
@ -36,8 +36,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
LanguageModelIRST::LanguageModelIRST(bool registerScore)
|
LanguageModelIRST::LanguageModelIRST(bool registerScore, ScoreIndexManager &scoreIndexManager)
|
||||||
:LanguageModelSingleFactor(registerScore)
|
:LanguageModelSingleFactor(registerScore, scoreIndexManager)
|
||||||
,m_lmtb(0)
|
,m_lmtb(0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -61,7 +61,7 @@ protected:
|
|||||||
};
|
};
|
||||||
|
|
||||||
public:
|
public:
|
||||||
LanguageModelIRST(bool registerScore);
|
LanguageModelIRST(bool registerScore, ScoreIndexManager &scoreIndexManager);
|
||||||
~LanguageModelIRST();
|
~LanguageModelIRST();
|
||||||
bool Load(const std::string &filePath
|
bool Load(const std::string &filePath
|
||||||
, FactorType factorType
|
, FactorType factorType
|
||||||
|
@ -33,8 +33,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|||||||
#include "Phrase.h"
|
#include "Phrase.h"
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
LanguageModelSRI::LanguageModelSRI(bool registerScore)
|
LanguageModelSRI::LanguageModelSRI(bool registerScore, ScoreIndexManager &scoreIndexManager)
|
||||||
:LanguageModelSingleFactor(registerScore)
|
:LanguageModelSingleFactor(registerScore, scoreIndexManager)
|
||||||
, m_srilmVocab(0)
|
, m_srilmVocab(0)
|
||||||
, m_srilmModel(0)
|
, m_srilmModel(0)
|
||||||
{
|
{
|
||||||
|
@ -46,7 +46,7 @@ protected:
|
|||||||
VocabIndex GetLmID( const Factor *factor ) const;
|
VocabIndex GetLmID( const Factor *factor ) const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
LanguageModelSRI(bool registerScore);
|
LanguageModelSRI(bool registerScore, ScoreIndexManager &scoreIndexManager);
|
||||||
~LanguageModelSRI();
|
~LanguageModelSRI();
|
||||||
bool Load(const std::string &filePath
|
bool Load(const std::string &filePath
|
||||||
, FactorType factorType
|
, FactorType factorType
|
||||||
|
@ -5,7 +5,7 @@ use strict;
|
|||||||
# if your tests need a new version of the test data, increment this
|
# if your tests need a new version of the test data, increment this
|
||||||
# and make sure that a moses-regression-tests-vX.Y is available for
|
# and make sure that a moses-regression-tests-vX.Y is available for
|
||||||
# download from statmt.org (redpony AT umd dot edu for more info)
|
# download from statmt.org (redpony AT umd dot edu for more info)
|
||||||
use constant TESTING_DATA_VERSION => '0.2';
|
use constant TESTING_DATA_VERSION => '0.1';
|
||||||
|
|
||||||
# find the data directory in a few likely locations and make sure
|
# find the data directory in a few likely locations and make sure
|
||||||
# that it is the correct version
|
# that it is the correct version
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
TRANSLATION_0=there are various different opinions .
|
TRANSLATION_0=there are various different opinions .
|
||||||
LMLOAD_TIME ~ 11.00
|
LMLOAD_TIME ~ 11.00
|
||||||
PTLOAD_TIME ~ 23.00
|
PTLOAD_TIME ~ 23.00
|
||||||
SCORE_0= -13.73
|
SCORE_0= -113.73
|
||||||
TRANSLATION_0_NBEST_1=there are various different opinions . ||| d: 0 lm: -21.6664 tm: -3.46226 -10.822 -2.82666 -9.32004 2.99969 -2.44147 -4.91188 -6.12017 -10.5033 2.99969 w: -6 g: -0.0625204 -18.098
|
TRANSLATION_0_NBEST_1=there are various different opinions . ||| d: 0 lm: -21.6664 tm: -3.46226 -10.822 -2.82666 -9.32004 2.99969 -2.44147 -4.91188 -6.12017 -10.5033 2.99969 w: -6 g: -0.0625204 -18.098
|
||||||
TRANSLATION_0_NBEST_2=there are various other opinions . ||| d: 0 lm: -25.3276 tm: -1.94591 -10.3833 -0.693147 -7.77959 1.99979 -0.924822 -4.91188 -3.33314 -10.5033 1.99979 w: -6 g: -0.149241 -16.9924
|
TRANSLATION_0_NBEST_2=there are various other opinions . ||| d: 0 lm: -25.3276 tm: -1.94591 -10.3833 -0.693147 -7.77959 1.99979 -0.924822 -4.91188 -3.33314 -10.5033 1.99979 w: -6 g: -0.149241 -16.9924
|
||||||
TOTAL_WALLTIME ~ 23
|
TOTAL_WALLTIME ~ 23
|
||||||
|
Loading…
Reference in New Issue
Block a user