diff options
author | Hieu Hoang <hieu@hoang.co.uk> | 2013-05-30 21:34:10 +0400 |
---|---|---|
committer | Hieu Hoang <hieu@hoang.co.uk> | 2013-05-30 21:34:10 +0400 |
commit | 117eb76b0a0eb9563028206a547f8bf3e6e43fb2 (patch) | |
tree | 2906efdf0370cc520bd6c4f0d16205ff71f0685f /moses/FactorTypeSet.cpp | |
parent | f83622b0b76244964371ca7753a44d711d02c42a (diff) |
figure out which feature function to apply at which decode step. Book-keeping
Diffstat (limited to 'moses/FactorTypeSet.cpp')
-rw-r--r-- | moses/FactorTypeSet.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/moses/FactorTypeSet.cpp b/moses/FactorTypeSet.cpp index de2166ba2..44379e9f8 100644 --- a/moses/FactorTypeSet.cpp +++ b/moses/FactorTypeSet.cpp @@ -33,6 +33,19 @@ FactorMask::FactorMask(const vector<FactorType> &factors) } } +bool FactorMask::IsUseable(const FactorMask &other) const +{ + for (size_t i = 0; i < other.size(); ++i) { + if (other[i]) { + if (!this->operator[](i) ) { + return false; + } + } + } + + return true; +} + TO_STRING_BODY(FactorMask); // friend |