|
Joshua
open source statistical hierarchical phrase-based machine translation system
|
Public Member Functions | |
| void | setFeatureID (int id) |
| int | getFeatureID () |
| void | setWeight (double weight) |
| double | getWeight () |
| boolean | isStateful () |
| void | setStateID (int stateID) |
| int | getStateID () |
| double | estimateLogP (Rule rule, int sentID) |
| double | estimateFutureLogP (Rule rule, DPState curDPState, int sentID) |
| double | transitionLogP (Rule rule, List< HGNode > antNodes, int spanStart, int spanEnd, SourcePath srcPath, int sentID) |
| double | transitionLogP (HyperEdge edge, int spanStart, int spanEnd, int sentID) |
| double | finalTransitionLogP (HGNode antNode, int spanStart, int spanEnd, SourcePath srcPath, int sentID) |
| double | finalTransitionLogP (HyperEdge edge, int spanStart, int spanEnd, int sentID) |
This interface provide ways to calculate logP based on rule and state information. In order to implement a new feature function you must (1) implement this FeatureFunction interface, and (2) implement the FFTransitionResult and FFDPState interfaces. BUG: the distinction between those latter two interfaces is unclear.
| double joshua.decoder.ff.FeatureFunction.estimateFutureLogP | ( | Rule | rule, |
| DPState | curDPState, | ||
| int | sentID | ||
| ) |
estimate future logP, e.g., the logPs of partial n-grams asscociated with the left-edge ngram state
Implemented in joshua.decoder.ff.lm.LanguageModelFF, joshua.decoder.ff.DefaultStatelessFF, and joshua.decoder.ff.similarity.EdgePhraseSimilarityFF.
| double joshua.decoder.ff.FeatureFunction.estimateLogP | ( | Rule | rule, |
| int | sentID | ||
| ) |
sentID might be useful for sentence-specific features (e.g., oralce model) It is used when initializing translation grammars (for pruning purpose, and to get stateless logP for each rule). This is also required to sort the rules (required by Cube-pruning).
Implemented in joshua.decoder.ff.lm.LanguageModelFF, and joshua.decoder.ff.similarity.EdgePhraseSimilarityFF.
| double joshua.decoder.ff.FeatureFunction.finalTransitionLogP | ( | HGNode | antNode, |
| int | spanStart, | ||
| int | spanEnd, | ||
| SourcePath | srcPath, | ||
| int | sentID | ||
| ) |
Edges calling finalTransition do not have concret rules associated with them.
Implemented in joshua.decoder.ff.similarity.EdgePhraseSimilarityFF, joshua.decoder.ff.lm.LanguageModelFF, and joshua.decoder.ff.DefaultStatelessFF.
| double joshua.decoder.ff.FeatureFunction.finalTransitionLogP | ( | HyperEdge | edge, |
| int | spanStart, | ||
| int | spanEnd, | ||
| int | sentID | ||
| ) |
Implemented in joshua.decoder.ff.DefaultStatelessFF, and joshua.decoder.ff.DefaultStatefulFF.
Implemented in joshua.decoder.ff.DefaultStatelessFF, and joshua.decoder.ff.DefaultStatefulFF.
Implemented in joshua.decoder.ff.DefaultStatelessFF, and joshua.decoder.ff.DefaultStatefulFF.
| double joshua.decoder.ff.FeatureFunction.getWeight | ( | ) |
Implemented in joshua.decoder.ff.DefaultStatelessFF, and joshua.decoder.ff.DefaultStatefulFF.
| boolean joshua.decoder.ff.FeatureFunction.isStateful | ( | ) |
Implemented in joshua.decoder.ff.DefaultStatelessFF, and joshua.decoder.ff.DefaultStatefulFF.
| void joshua.decoder.ff.FeatureFunction.setFeatureID | ( | int | id | ) |
It is essential to make sure the feature ID is unique for each feature.
| void joshua.decoder.ff.FeatureFunction.setStateID | ( | int | stateID | ) |
| void joshua.decoder.ff.FeatureFunction.setWeight | ( | double | weight | ) |
| double joshua.decoder.ff.FeatureFunction.transitionLogP | ( | Rule | rule, |
| List< HGNode > | antNodes, | ||
| int | spanStart, | ||
| int | spanEnd, | ||
| SourcePath | srcPath, | ||
| int | sentID | ||
| ) |
| double joshua.decoder.ff.FeatureFunction.transitionLogP | ( | HyperEdge | edge, |
| int | spanStart, | ||
| int | spanEnd, | ||
| int | sentID | ||
| ) |
Implemented in joshua.decoder.ff.DefaultStatelessFF, and joshua.decoder.ff.DefaultStatefulFF.