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

List of all members.

Public Member Functions

 ParserThread (List< GrammarFactory > grammarFactories, List< FeatureFunction > featureFunctions, List< StateComputer > stateComputers, InputHandler inputHandler) throws IOException
void run ()
void parseAll () throws IOException
HyperGraph parse (Sentence sentence, String oracleSentence) throws IOException

Package Attributes

DiskHyperGraph hypergraphSerializer

Static Private Member Functions

static Grammar getGrammarFromHyperGraph (String goal, HyperGraph hg) throws IOException

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(ParserThread.class.getName())

Detailed Description

This class handles parsing 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:
Jonny Weese jonny.nosp@m.@cs..nosp@m.jhu.e.nosp@m.du
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.ParserThread.ParserThread ( List< GrammarFactory grammarFactories,
List< FeatureFunction featureFunctions,
List< StateComputer >  stateComputers,
InputHandler  inputHandler 
) throws IOException

Member Function Documentation

static Grammar joshua.decoder.ParserThread.getGrammarFromHyperGraph ( String  goal,
HyperGraph  hg 
) throws IOException [static, private]

Here is the call graph for this function:

Here is the caller graph for this function:

HyperGraph joshua.decoder.ParserThread.parse ( Sentence  sentence,
String  oracleSentence 
) throws IOException

Parse a sentence.

Parameters:
segmentThe sentence to be parsed.
oracleSentence

Here is the call graph for this function:

Here is the caller graph for this function:

void joshua.decoder.ParserThread.parseAll ( ) 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:

Here is the call graph for this function:


Member Data Documentation

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