mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-12-26 21:42:19 +03:00
minor renaming
This commit is contained in:
parent
154ca336d6
commit
4676bca90f
@ -47,7 +47,7 @@ ObjectPool<ChartHypothesis> ChartHypothesis::s_objectPool("ChartHypothesis", 300
|
||||
ChartHypothesis::ChartHypothesis(const ChartTranslationOptions &transOpt,
|
||||
const RuleCubeItem &item,
|
||||
ChartManager &manager)
|
||||
:m_targetPhrase(item.GetTranslationDimension().GetTargetPhrase())
|
||||
:m_transOpt(item.GetTranslationDimension().GetTranslationOption())
|
||||
,m_currSourceWordsRange(transOpt.GetSourceWordsRange())
|
||||
,m_ffStates(StatefulFeatureFunction::GetStatefulFeatureFunctions().size())
|
||||
,m_arcList(NULL)
|
||||
|
@ -49,7 +49,7 @@ protected:
|
||||
static ObjectPool<ChartHypothesis> s_objectPool;
|
||||
#endif
|
||||
|
||||
boost::shared_ptr<ChartTranslationOption> m_targetPhrase;
|
||||
boost::shared_ptr<ChartTranslationOption> m_transOpt;
|
||||
|
||||
WordsRange m_currSourceWordsRange;
|
||||
std::vector<const FFState*> m_ffStates; /*! stateful feature function states */
|
||||
@ -100,9 +100,13 @@ public:
|
||||
return m_id;
|
||||
}
|
||||
|
||||
const ChartTranslationOption &GetTranslationOption()const {
|
||||
return *m_transOpt;
|
||||
}
|
||||
|
||||
//! Get the rule that created this hypothesis
|
||||
const TargetPhrase &GetCurrTargetPhrase()const {
|
||||
return m_targetPhrase->GetPhrase();
|
||||
return m_transOpt->GetPhrase();
|
||||
}
|
||||
|
||||
//! the source range that this hypothesis spans
|
||||
|
@ -70,7 +70,7 @@ public:
|
||||
size_t operator()(const RuleCubeItem *p) const {
|
||||
size_t seed = 0;
|
||||
boost::hash_combine(seed, p->GetHypothesisDimensions());
|
||||
boost::hash_combine(seed, p->GetTranslationDimension().GetTargetPhrase());
|
||||
boost::hash_combine(seed, p->GetTranslationDimension().GetTranslationOption());
|
||||
return seed;
|
||||
}
|
||||
};
|
||||
|
@ -65,7 +65,7 @@ RuleCubeItem::~RuleCubeItem()
|
||||
|
||||
void RuleCubeItem::EstimateScore()
|
||||
{
|
||||
m_score = m_translationDimension.GetTargetPhrase()->GetPhrase().GetFutureScore();
|
||||
m_score = m_translationDimension.GetTranslationOption()->GetPhrase().GetFutureScore();
|
||||
std::vector<HypothesisDimension>::const_iterator p;
|
||||
for (p = m_hypothesisDimensions.begin();
|
||||
p != m_hypothesisDimensions.end(); ++p) {
|
||||
|
@ -53,16 +53,16 @@ public:
|
||||
return m_pos+1 < m_orderedTargetPhrases.size();
|
||||
}
|
||||
|
||||
const boost::shared_ptr<ChartTranslationOption> &GetTargetPhrase() const {
|
||||
const boost::shared_ptr<ChartTranslationOption> &GetTranslationOption() const {
|
||||
return m_orderedTargetPhrases[m_pos];
|
||||
}
|
||||
|
||||
bool operator<(const TranslationDimension &compare) const {
|
||||
return GetTargetPhrase() < compare.GetTargetPhrase();
|
||||
return GetTranslationOption()->GetPhrase() < compare.GetTranslationOption()->GetPhrase();
|
||||
}
|
||||
|
||||
bool operator==(const TranslationDimension &compare) const {
|
||||
return GetTargetPhrase() == compare.GetTargetPhrase();
|
||||
return GetTranslationOption()->GetPhrase() == compare.GetTranslationOption()->GetPhrase();
|
||||
}
|
||||
|
||||
private:
|
||||
|
Loading…
Reference in New Issue
Block a user