Program Listing for File response.h¶
↰ Return to documentation for file (src/translator/response.h
)
#ifndef SRC_BERGAMOT_RESPONSE_H_
#define SRC_BERGAMOT_RESPONSE_H_
#include <cassert>
#include <string>
#include <vector>
#include "annotation.h"
#include "data/alignment.h"
#include "data/types.h"
#include "definitions.h"
#include "translator/beam_search.h"
namespace marian {
namespace bergamot {
struct Point {
size_t src;
size_t tgt;
float prob;
};
typedef std::vector<Point> Alignment;
struct Quality {
float sequence;
std::vector<float> word;
};
struct Response {
const size_t size() const { return source.numSentences(); }
AnnotatedText source;
AnnotatedText target;
std::vector<Quality> qualityScores;
std::vector<Alignment> alignments;
const std::string &getOriginalText() const { return source.text; }
const std::string &getTranslatedText() const { return target.text; }
};
} // namespace bergamot
} // namespace marian
#endif // SRC_BERGAMOT_RESPONSE_H_