diff options
author | Barry Haddow <barry.haddow@gmail.com> | 2013-03-01 02:48:41 +0400 |
---|---|---|
committer | Barry Haddow <barry.haddow@gmail.com> | 2013-03-01 02:48:41 +0400 |
commit | ef87461d07e46be2b2542872e25bef6c3ad2f444 (patch) | |
tree | 186ed13ac9abbc22525894720bdf1b70aea43775 /moses/Phrase.h | |
parent | ed117f55c9e958793adac1d7383b1333d0b1b72c (diff) |
Interpolated phrase feature
Diffstat (limited to 'moses/Phrase.h')
-rw-r--r-- | moses/Phrase.h | 16 |
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 |