diff options
Diffstat (limited to 'decoder/trule.cc')
-rw-r--r-- | decoder/trule.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/decoder/trule.cc b/decoder/trule.cc index 505839c7..170e3a95 100644 --- a/decoder/trule.cc +++ b/decoder/trule.cc @@ -7,6 +7,11 @@ using namespace std; +bool TRule::IsGoal() const { + static const int kGOAL(TD::Convert("Goal") * -1); // this will happen once, and after static init of trule.cc static dict. + return GetLHS() == kGOAL; +} + static WordID ConvertTrgString(const string& w) { int len = w.size(); WordID id = 0; |