Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBarry Haddow <barry.haddow@gmail.com>2013-03-01 02:48:41 +0400
committerBarry Haddow <barry.haddow@gmail.com>2013-03-01 02:48:41 +0400
commitef87461d07e46be2b2542872e25bef6c3ad2f444 (patch)
tree186ed13ac9abbc22525894720bdf1b70aea43775 /moses/Phrase.h
parented117f55c9e958793adac1d7383b1333d0b1b72c (diff)
Interpolated phrase feature
Diffstat (limited to 'moses/Phrase.h')
-rw-r--r--moses/Phrase.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/moses/Phrase.h b/moses/Phrase.h
index 7c7f9b0e4..ed2942c3e 100644
--- a/moses/Phrase.h
+++ b/moses/Phrase.h
@@ -180,5 +180,21 @@ inline size_t hash_value(const Phrase& phrase) {
return seed;
}
+struct PhrasePtrComparator {
+ inline bool operator()(const Phrase* lhs, const Phrase* rhs) const {
+ return *lhs == *rhs;
+ }
+};
+
+struct PhrasePtrHasher {
+ inline size_t operator()(const Phrase* phrase) const {
+ size_t seed = 0;
+ boost::hash_combine(seed,*phrase);
+ return seed;
+ }
+
+};
+
}
+
#endif