mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-10-05 15:58:03 +03:00
daily automatic beautifier
This commit is contained in:
parent
4604cc96ba
commit
10531d5f02
@ -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) {
|
||||
|
@ -75,7 +75,7 @@ public:
|
||||
m_options = opts;
|
||||
}
|
||||
|
||||
AllOptions::ptr const&
|
||||
AllOptions::ptr const&
|
||||
options() const {
|
||||
return m_options;
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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();
|
||||
|
||||
|
@ -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) {
|
||||
|
@ -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
|
||||
|
@ -206,7 +206,7 @@ public:
|
||||
}
|
||||
|
||||
AllOptions::ptr const
|
||||
options() const {
|
||||
options() const {
|
||||
return m_options;
|
||||
}
|
||||
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user