Class ResponseBuilder¶
Defined in File response_builder.h
Class Documentation¶
-
class
ResponseBuilder
¶ ResponseBuilder is a callback functor.
It is expected to be bound to a Request after giving it the context of options, vocabs and promise to set. It constructs the Response and it’s members based on options (quality=on|off, alignments=on|off, mappings=on|off, splitmode=sentence | paragraph).
Public Functions
-
ResponseBuilder
(ResponseOptions responseOptions, AnnotatedText &&source, const Vocabs &vocabs, std::function<void(Response&&)> callback, const QualityEstimator &qualityEstimator, )¶ - Parameters
[in] responseOptions
: ResponseOptions, indicating what to include or not in the response and any additional configurable parameters.[in] vocabs
: marian vocab object (used in decoding)[in] callback
: callback with operates on the constructed Response.[in] qualityEstimator
: the QualityEstimator model that can be used to provide translation quality probability.
-