diff options
Diffstat (limited to 'decoder/decoder.cc')
-rw-r--r-- | decoder/decoder.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/decoder/decoder.cc b/decoder/decoder.cc index a21b47c0..3551b584 100644 --- a/decoder/decoder.cc +++ b/decoder/decoder.cc @@ -638,6 +638,10 @@ bool Decoder::Decode(const string& input, DecoderObserver* o) { return res; } void Decoder::SetWeights(const vector<double>& weights) { pimpl_->SetWeights(weights); } +void Decoder::SetSupplementalGrammar(const std::string& grammar_string) { + assert(pimpl_->translator->GetDecoderType() == "SCFG"); + static_cast<SCFGTranslator&>(*pimpl_->translator).SetSupplementalGrammar(grammar_string); +} bool DecoderImpl::Decode(const string& input, DecoderObserver* o) { |