public Translation decode(Sentence sentence){
  try {
    DecoderTask decoderTask=new DecoderTask(this.grammars,Decoder.weights,this.featureFunctions,joshuaConfiguration);
    return decoderTask.translate(sentence);
  }
 catch (  IOException e) {
    throw new RuntimeException(String.format("Input %d: FATAL UNCAUGHT EXCEPTION: %s",sentence.id(),e.getMessage()),e);
  }
}

public Translation decode ( Sentence sentence ) { try { DecoderTask decoderTask = new DecoderTask ( this . grammars , Decoder . weights , this . featureFunctions , joshuaConfiguration ) ; return decoderTask . translate ( sentence ) ; } catch ( IOException e ) { throw new RuntimeException ( String . format ( "Input %d: FATAL UNCAUGHT EXCEPTION: %s" , sentence . id ( ) , e . getMessage ( ) ) , e ) ; } }
we can also just decode a single sentence in the same thread .
