ToString() -> OutputTargetPhrase()

This commit is contained in:
Hieu Hoang 2016-06-21 21:07:38 +01:00
parent 062081c2a9
commit 5118578347
3 changed files with 6 additions and 4 deletions

View File

@ -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;
}

View File

@ -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;

View File

@ -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,