daily automatic beautifier

This commit is contained in:
MosesAdmin 2015-12-12 00:00:41 +00:00
parent 4604cc96ba
commit 10531d5f02
9 changed files with 16 additions and 16 deletions

View File

@ -61,7 +61,7 @@ public:
, m_transOptRange(transOptRange) {
m_totalWeightDistortion = 0;
const StaticData &staticData = StaticData::Instance();
const std::vector<const DistortionScoreProducer*> &ffs = DistortionScoreProducer::GetDistortionFeatureFunctions();
std::vector<const DistortionScoreProducer*>::const_iterator iter;
for (iter = ffs.begin(); iter != ffs.end(); ++iter) {

View File

@ -75,7 +75,7 @@ public:
m_options = opts;
}
AllOptions::ptr const&
AllOptions::ptr const&
options() const {
return m_options;
}

View File

@ -569,9 +569,9 @@ void SoftSourceSyntacticConstraintsFeature::EvaluateWithSourceContext(const Inpu
}
if ( treeInputLabelsLHS.size() == 0 ) {
scoreBreakdown.PlusEquals(this,
"LHSPAIR_" + targetLHS->GetString().as_string() + "_"
+ m_options->syntax.output_default_non_terminal[0]
->GetString().as_string(),
"LHSPAIR_" + targetLHS->GetString().as_string() + "_"
+ m_options->syntax.output_default_non_terminal[0]
->GetString().as_string(),
1);
if (!m_targetSourceLHSJointCountFile.empty()) {
t2sLabelsScore = TransformScore(m_floor);

View File

@ -48,10 +48,10 @@ void SourceGHKMTreeInputMatchFeature::EvaluateWithSourceContext(const InputType
const StaticData& staticData = StaticData::Instance();
std::vector<float> newScores(m_numScoreComponents,0.0);
std::vector<float> newScores(m_numScoreComponents,0.0);
// m_numScoreComponents == 2 // first fires for matches, second for mismatches
if ( (treeInputLabels.find(lhsLabel) != treeInputLabels.end())
if ( (treeInputLabels.find(lhsLabel) != treeInputLabels.end())
&& (lhsLabel != m_options->syntax.output_default_non_terminal) ) {
// match
newScores[0] = 1.0;

View File

@ -96,7 +96,7 @@ bool LanguageModelIRST::IsUseable(const FactorMask &mask) const
return ret;
}
void LanguageModelIRST::Load(AllOptions::ptr const& opts)
void LanguageModelIRST::Load(AllOptions::ptr const& opts)
{
FactorCollection &factorCollection = FactorCollection::Instance();

View File

@ -187,7 +187,7 @@ bool ReorderingConstraint::Check( const Bitmap &bitmap, size_t startPos, size_t
// check, if we are setting us up for a dead end due to distortion limits
// size_t distortionLimit = (size_t)StaticData::Instance().GetMaxDistortion();
size_t distortionLimit = m_max_distortion;
if (startPos != firstGapPos && endZone-firstGapPos >= distortionLimit) {

View File

@ -57,11 +57,11 @@ protected:
public:
//! create ReorderingConstraint of length size and initialise to zero
ReorderingConstraint(int max_distortion)
: m_wall(NULL)
, m_localWall(NULL)
, m_active(false)
, m_max_distortion(max_distortion)
ReorderingConstraint(int max_distortion)
: m_wall(NULL)
, m_localWall(NULL)
, m_active(false)
, m_max_distortion(max_distortion)
{}
//! destructer

View File

@ -206,7 +206,7 @@ public:
}
AllOptions::ptr const
options() const {
options() const {
return m_options;
}

View File

@ -252,7 +252,7 @@ Read(std::istream& in)
stringstream strme;
strme << line << endl;
Sentence::Read(strme);
Sentence::Read(strme);
// size input chart
size_t sourceSize = GetSize();