summaryrefslogtreecommitdiff
path: root/decoder/ffset.h
diff options
context:
space:
mode:
authorWu, Ke <wuke@cs.umd.edu>2014-10-07 18:05:58 -0400
committerWu, Ke <wuke@cs.umd.edu>2014-10-07 18:05:58 -0400
commit6c7bf8cf49db88ca47e5b08aa449032995736854 (patch)
treeca83ed01056b69aa7291910297ac9ee3cfd237a6 /decoder/ffset.h
parent577e6e7f9755919f4929235d2320435522e65d76 (diff)
Add ConstReorderFeature
Diffstat (limited to 'decoder/ffset.h')
-rw-r--r--decoder/ffset.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/decoder/ffset.h b/decoder/ffset.h
index 28aef667..0467b01d 100644
--- a/decoder/ffset.h
+++ b/decoder/ffset.h
@@ -47,6 +47,17 @@ class ModelSet {
bool stateless() const { return !state_size_; }
+ //added by ljh
+ //some states of features are not contextual, but used for storing some useful information for calculate feature val
+ //it needs to erase these states
+ //this function is only called by IncorporateIntoPlusLMForest(...) in apply_models.cc
+ void GetRealFFState(const FFState& state, FFState& real_state) const;
+ FFState GetRealFFState(const FFState& state) const;
+ bool HaveEraseState() const;
+ private:
+ std::vector<int> erase_state_start_pos_;
+ std::vector<int> erase_state_end_pos_;
+
private:
std::vector<const FeatureFunction*> models_;
const std::vector<double>& weights_;