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

List of all members.

Public Member Functions

boolean equals (Object obj)
int hashCode ()
String toString ()
 Candidate (List< Hypothesis > hypotheses, TargetPhrases phrases, Span span, float delta)
 Candidate (List< Hypothesis > hypotheses, TargetPhrases phrases, Span span, float delta, int[] ranks)
Candidate[] extend ()
Candidate extendHypothesis ()
Candidate extendPhrase ()
int compareTo (Candidate other)
Span getSpan ()
Hypothesis getHypothesis ()
Rule getRule ()
List< HGNodegetTailNodes ()
Coverage getCoverage ()
void setResult (ComputeNodeResult result)
float score ()
float getFutureEstimate ()
List< DPStategetStates ()
ComputeNodeResult getResult ()

Public Attributes

Span span

Package Attributes

float future_delta

Private Attributes

List< Hypothesishypotheses
TargetPhrases phrases
int[] ranks
ComputeNodeResult result

Constructor & Destructor Documentation

joshua.decoder.phrase.Candidate.Candidate ( List< Hypothesis hypotheses,
TargetPhrases  phrases,
Span  span,
float  delta 
)

Here is the caller graph for this function:

joshua.decoder.phrase.Candidate.Candidate ( List< Hypothesis hypotheses,
TargetPhrases  phrases,
Span  span,
float  delta,
int[]  ranks 
)

Member Function Documentation

Here is the call graph for this function:

boolean joshua.decoder.phrase.Candidate.equals ( Object  obj)

When candidate objects are extended, the new one is initialized with the same underlying "phrases" and "hypotheses" and "span" objects. So these all have to be equal, as well as the ranks.

This is used to prevent cube pruning from adding the same candidate twice, having reached a point in the cube via different paths.

Here is the call graph for this function:

Extends the cube pruning dot in both directions and returns the resulting set. Either of the results can be null if the end of their respective lists is reached.

Returns:
The neighboring candidates (possibly null)

Here is the call graph for this function:

Here is the caller graph for this function:

Extends the cube pruning dot along the dimension of existing hypotheses.

Returns:
the next candidate, or null if none

Here is the call graph for this function:

Here is the caller graph for this function:

Extends the cube pruning dot along the dimension of candidate target sides.

Returns:
the next Candidate, or null if none

Here is the call graph for this function:

Here is the caller graph for this function:

Returns the bit vector of this hypothesis. The bit vector is computed by ORing the coverage vector of the tail node (hypothesis) and the source span of phrases in this candidate.

Returns:

Here is the call graph for this function:

Here is the caller graph for this function:

Here is the call graph for this function:

Here is the caller graph for this function:

A candidate is a (hypothesis, target phrase) pairing. The hypothesis and target phrase are drawn from a list that is indexed by (ranks[0], ranks[1]), respectively. This is a shortcut to return the hypothesis of the candidate pair.

Returns:
the hypothesis at position ranks[0]

Here is the caller graph for this function:

Here is the caller graph for this function:

This returns the target side Phrase, which is a Rule object. This is just a convenience function that works by returning the phrase indexed in ranks[1].

Returns:
the phrase at position ranks[1]

Here is the caller graph for this function:

Returns the input span from which the phrases for this candidates were gathered.

Returns:
the span object

Here is the caller graph for this function:

Here is the call graph for this function:

Here is the caller graph for this function:

The hypotheses list is a list of tail pointers. This function returns the tail pointer currently selected by the value in ranks.

Returns:
a list of size one, wrapping the tail node pointer

Here is the call graph for this function:

Here is the caller graph for this function:

Here is the call graph for this function:

This returns the sum of two costs: the HypoState cost + the transition cost. The HypoState cost is in turn the sum of two costs: the Viterbi cost of the underlying hypothesis, and the adjustment to the future score incurred by translating the words under the source phrase being added. The transition cost is the sum of new features incurred along the transition (mostly, the language model costs).

The Future Cost item should probably just be implemented as another kind of feature function, but it would require some reworking of that interface, which isn't worth it.

Returns:

Here is the call graph for this function:

Here is the caller graph for this function:

Sets the result of a candidate (should just be moved to the constructor).

Parameters:
result

Here is the caller graph for this function:

Here is the call graph for this function:


Member Data Documentation