00001 #pragma once 00002 00003 #include "moses/Factor.h" 00004 #include "moses/Word.h" 00005 00006 namespace Moses 00007 { 00008 namespace Syntax 00009 { 00010 00011 // Assumes that only the first factor is relevant. i.e. factored decoding will 00012 // *not* work in moses_chart unless this is changed (among other things). 00013 class SymbolEqualityPred 00014 { 00015 public: 00016 bool operator()(const Word &s1, const Word &s2) const { 00017 const Factor *f1 = s1[0]; 00018 const Factor *f2 = s2[0]; 00019 return !(f1->Compare(*f2)); 00020 } 00021 }; 00022 00023 } // namespace Syntax 00024 } // namespace Moses