diff options
author | Colin Cherry <colin.a.cherry@gmail.com> | 2012-05-29 21:38:57 +0400 |
---|---|---|
committer | Colin Cherry <colin.a.cherry@gmail.com> | 2012-05-29 21:38:57 +0400 |
commit | fd577d7a65cab923b9102d61873a032654d573a1 (patch) | |
tree | 24dddd8e7a412f29f2f55e8ecad0b6055f8530c0 /mert/FeatureDataIterator.h | |
parent | 6d1165654caf8edc995a41a4c6c9666e65ebce96 (diff) |
Batch k-best MIRA is written and integrated into mert-moses.pl
Regression tests all check out, and kbmira seems to work fine
on a Hansard French->English task.
HypPackEnumerator class may be of interest to pro.cpp and future
optimizers, as it abstracts a lot of the boilerplate involved in
enumerating multiple k-best lists.
MiraWeightVector is not really mira-specific - just a weight vector
that enables efficient averaging. Could be useful to a perceptron
as well. Same goes for MiraFeatureVector.
Interaction with sparse features is written, but untested.
Diffstat (limited to 'mert/FeatureDataIterator.h')
-rw-r--r-- | mert/FeatureDataIterator.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/mert/FeatureDataIterator.h b/mert/FeatureDataIterator.h index 58345829c..9bc5f03f7 100644 --- a/mert/FeatureDataIterator.h +++ b/mert/FeatureDataIterator.h @@ -61,6 +61,9 @@ class FeatureDataItem SparseVector sparse; }; +bool operator==(FeatureDataItem const& item1, FeatureDataItem const& item2); +std::size_t hash_value(FeatureDataItem const& item); + class FeatureDataIterator : public boost::iterator_facade<FeatureDataIterator, const std::vector<FeatureDataItem>, |