src/lstm/recodebeam.cpp
void RecodeBeamSearch::ExtractBestPathAsUnicharIds(
    bool debug, const UNICHARSET *unicharset, std::vector<int> *unichar_ids,
    std::vector<float> *certs, std::vector<float> *ratings,
    std::vector<int> *xcoords) const {
  std::vector<const RecodeNode *> best_nodes;
  ExtractBestPaths(&best_nodes, nullptr);
  ExtractPathAsUnicharIds(best_nodes, unichar_ids, certs, ratings, xcoords);
  if (debug) {
    DebugPath(unicharset, best_nodes);
    DebugUnicharPath(unicharset, best_nodes, *unichar_ids, *certs, *ratings,
                     *xcoords);
  }
}
// Returns the best path as unichar-ids/certs/ratings/xcoords skipping
// duplicates, nulls and intermediate parts.
Returns the best path as unichar-ids/certs/ratings/xcoords skipping
duplicates, nulls and intermediate parts.
Returns the best path as unichar - ids / certs / ratings / xcoords skipping duplicates nulls and intermediate parts .
void RecodeBeamSearch::ExtractBestPathAsUnicharIds(
    bool debug, const UNICHARSET *unicharset, std::vector<int> *unichar_ids,
    std::vector<float> *certs, std::vector<float> *ratings,
    std::vector<int> *xcoords) const {
  std::vector<const RecodeNode *> best_nodes;
  ExtractBestPaths(&best_nodes, nullptr);
  ExtractPathAsUnicharIds(best_nodes, unichar_ids, certs, ratings, xcoords);
  if (debug) {
    DebugPath(unicharset, best_nodes);
    DebugUnicharPath(unicharset, best_nodes, *unichar_ids, *certs, *ratings,
                     *xcoords);
  }
}
void RecodeBeamSearch :: ExtractBestPathAsUnicharIds ( bool debug , const UNICHARSET * unicharset , std :: vector < int > * unichar_ids , std :: vector < float > * certs , std :: vector < float > * ratings , std :: vector < int > * xcoords ) const { std :: vector < const RecodeNode * > best_nodes ; ExtractBestPaths ( & best_nodes , nullptr ) ; ExtractPathAsUnicharIds ( best_nodes , unichar_ids , certs , ratings , xcoords ) ; if ( debug ) { DebugPath ( unicharset , best_nodes ) ; DebugUnicharPath ( unicharset , best_nodes , * unichar_ids , * certs , * ratings , * xcoords ) ; } }
Returns the best path as unichar-ids/certs/ratings/xcoords skipping
duplicates, nulls and intermediate parts.
Returns the best path as unichar - ids / certs / ratings / xcoords skipping duplicates nulls and intermediate parts .