Joshua
open source statistical hierarchical phrase-based machine translation system
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends
joshua.decoder.DecoderThread Class Reference
Collaboration diagram for joshua.decoder.DecoderThread:
[legend]

List of all members.

Public Member Functions

 DecoderThread (List< GrammarFactory > grammarFactories, List< FeatureFunction > featureFunctions, List< StateComputer > stateComputers, InputHandler inputHandler) throws IOException
void run ()
void translateAll () throws IOException
HyperGraph translate (Sentence sentence, String oracleSentence) throws IOException

Package Attributes

DiskHyperGraph hypergraphSerializer

Private Attributes

final List< GrammarFactorygrammarFactories
final List< FeatureFunctionfeatureFunctions
final List< StateComputer > stateComputers
final InputHandler inputHandler
BufferedWriter nbestWriter
final KBestExtractor kbestExtractor

Static Private Attributes

static final Logger logger = Logger.getLogger(DecoderThread.class.getName())

Detailed Description

This class handles decoding of individual Sentence objects (which can represent plain sentences or lattices). A single sentence can be decoded by a call to translate() and, if an InputHandler is used, many sentences can be decoded in a thread-safe manner via a single call to translateAll(), which continually queries the InputHandler for sentences until they have all been consumed and translated.

The DecoderFactory class is responsible for launching the threads.

Author:
Matt Post post@.nosp@m.jhu..nosp@m.edu
Zhifei Li, zhife.nosp@m.i.wo.nosp@m.rk@gm.nosp@m.ail..nosp@m.com
Version:
LastChangedDate:
2010-05-02 11:19:17 -0400 (Sun, 02 May 2010)

Constructor & Destructor Documentation

joshua.decoder.DecoderThread.DecoderThread ( List< GrammarFactory grammarFactories,
List< FeatureFunction featureFunctions,
List< StateComputer >  stateComputers,
InputHandler  inputHandler 
) throws IOException

Member Function Documentation

Here is the call graph for this function:

HyperGraph joshua.decoder.DecoderThread.translate ( Sentence  sentence,
String  oracleSentence 
) throws IOException

Translate a sentence.

Parameters:
sentenceThe sentence to be translated.
oracleSentence

Here is the call graph for this function:

Here is the caller graph for this function:

void joshua.decoder.DecoderThread.translateAll ( ) throws IOException

Repeatedly fetches input sentences and calls translate() on them, registering the results with the InputManager upon completion.

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

final Logger joshua.decoder.DecoderThread.logger = Logger.getLogger(DecoderThread.class.getName()) [static, private]
BufferedWriter joshua.decoder.DecoderThread.nbestWriter [private]
final List<StateComputer> joshua.decoder.DecoderThread.stateComputers [private]