mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2025-01-01 16:33:16 +03:00
ToString() -> OutputTargetPhrase()
This commit is contained in:
parent
062081c2a9
commit
5118578347
@ -228,7 +228,9 @@ std::string Manager::OutputNBest()
|
||||
|
||||
bool ok = false;
|
||||
if (system.options.nbest.only_distinct) {
|
||||
string tgtPhrase = path->ToString();
|
||||
string tgtPhrase = path->OutputTargetPhrase(system);
|
||||
//cerr << "tgtPhrase=" << tgtPhrase << endl;
|
||||
|
||||
if (distinctHypos.insert(tgtPhrase).second) {
|
||||
ok = true;
|
||||
}
|
||||
|
@ -76,7 +76,7 @@ SCORE TrellisPath::GetFutureScore() const
|
||||
|
||||
void TrellisPath::Debug(std::ostream &out, const System &system) const
|
||||
{
|
||||
out << ToString();
|
||||
out << OutputTargetPhrase(system);
|
||||
out << "||| ";
|
||||
|
||||
GetScores().Debug(out, system);
|
||||
@ -85,7 +85,7 @@ void TrellisPath::Debug(std::ostream &out, const System &system) const
|
||||
out << GetScores().GetTotalScore();
|
||||
}
|
||||
|
||||
std::string TrellisPath::ToString() const
|
||||
std::string TrellisPath::OutputTargetPhrase(const System &system) const
|
||||
{
|
||||
//cerr << "path=" << this << " " << nodes.size() << endl;
|
||||
std::stringstream out;
|
||||
|
@ -65,7 +65,7 @@ public:
|
||||
SCORE GetFutureScore() const;
|
||||
|
||||
void Debug(std::ostream &out, const System &system) const;
|
||||
std::string ToString() const;
|
||||
std::string OutputTargetPhrase(const System &system) const;
|
||||
|
||||
//! create a set of next best paths by wiggling 1 of the node at a time.
|
||||
void CreateDeviantPaths(TrellisPaths &paths, const ArcLists &arcLists,
|
||||
|
Loading…
Reference in New Issue
Block a user