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< Grammar > grammars, FeatureVector weights, List< FeatureFunction > featureFunctions, JoshuaConfiguration joshuaConfiguration) throws IOException
void run ()
Translation translate (Sentence sentence)

Private Member Functions

Grammar getGrammarFromHyperGraph (String goal, HyperGraph hg)

Private Attributes

final JoshuaConfiguration joshuaConfiguration
final List< GrammarallGrammars
final List< FeatureFunctionfeatureFunctions

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.cs.j.nosp@m.hu.ed.nosp@m.u
Zhifei Li, zhife.nosp@m.i.wo.nosp@m.rk@gm.nosp@m.ail..nosp@m.com

Constructor & Destructor Documentation

joshua.decoder.DecoderThread.DecoderThread ( List< Grammar grammars,
FeatureVector  weights,
List< FeatureFunction featureFunctions,
JoshuaConfiguration  joshuaConfiguration 
) throws IOException

Member Function Documentation

Here is the call graph for this function:

Here is the caller graph for this function:

Translate a sentence.

Parameters:
sentenceThe sentence to be translated.

Joshua supports (as of September 2014) both phrase-based and hierarchical decoding. Here we build the appropriate chart. The output of both systems is a hypergraph, which is then used for further processing (e.g., k-best extraction).

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]