mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-10-26 19:37:58 +03:00
removing outdated method
This commit is contained in:
parent
7fbbc65902
commit
f169c59204
@ -50,20 +50,6 @@ protected:
|
||||
// 0 = last word of the hypothesis
|
||||
// 1 = next to last word
|
||||
// ...etc.
|
||||
//
|
||||
// We may have to go through more than one hypothesis when the context is long.
|
||||
inline std::string GetWord(const Hypothesis *hypo, size_t posFromEnd) const {
|
||||
while (hypo->GetCurrTargetPhrase().GetSize() <= posFromEnd) {
|
||||
posFromEnd -= hypo->GetCurrTargetPhrase().GetSize();
|
||||
hypo = hypo->GetPrevHypo();
|
||||
if (! hypo)
|
||||
return BOS_; // translation is not long enough
|
||||
}
|
||||
|
||||
const Phrase &phrase = hypo->GetCurrTargetPhrase();
|
||||
return phrase.GetWord(phrase.GetSize() - posFromEnd - 1).GetString(m_targetFactors, false);
|
||||
}
|
||||
|
||||
inline std::string GetWord(const Phrase &phrase, size_t posFromEnd) const {
|
||||
return phrase.GetWord(phrase.GetSize() - posFromEnd - 1).GetString(m_targetFactors, false);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user