opennmt.utils.DecodingStrategy

class opennmt.utils.DecodingStrategy[source]

Base class for decoding strategies.

Inherits from: builtins.object

property num_hypotheses

The number of hypotheses returned by this strategy.

static from_params(params)[source]

Constructs a decoding strategy based on user parameters.

Parameters

params – A dictionary of user parameters.

Returns

A opennmt.utils.DecodingStrategy instance.