diff options
author | nicolabertoldi <nicolabertoldi@1f5c12ca-751b-0410-a591-d2e778427230> | 2008-05-27 20:50:52 +0400 |
---|---|---|
committer | nicolabertoldi <nicolabertoldi@1f5c12ca-751b-0410-a591-d2e778427230> | 2008-05-27 20:50:52 +0400 |
commit | 291260abf74ed3fe0c9218465cff6e658d0a1b23 (patch) | |
tree | 474b29cf0ba2b37c5ed41b4c805a85121362a3a7 /mert/FeatureArray.h | |
parent | 89194be5ebb641072795d9e949312002ac6262e6 (diff) |
- made output more compliant with old version
- added PerSCorer.h and BleuScorer.h
- stored feature names
- fixed bug about output of best Point
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@1796 1f5c12ca-751b-0410-a591-d2e778427230
Diffstat (limited to 'mert/FeatureArray.h')
-rw-r--r-- | mert/FeatureArray.h | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/mert/FeatureArray.h b/mert/FeatureArray.h index 8901d2672..943056bab 100644 --- a/mert/FeatureArray.h +++ b/mert/FeatureArray.h @@ -27,10 +27,10 @@ using namespace std; class FeatureArray { protected: - vector<FeatureStats> array_; + featarray_t array_; private: - size_t idx; // idx to identify the utterance, it can differ from the index inside the vector + std::string idx; // idx to identify the utterance, it can differ from the index inside the vector public: FeatureArray(); @@ -39,17 +39,17 @@ public: inline void clear() { array_.clear(); } - inline size_t getIndex(){ return idx; } - inline void setIndex(size_t value){ idx=value; } + inline std::string getIndex(){ return idx; } + inline void setIndex(const std::string & value){ idx=value; } - inline FeatureStats& get(int i){ return array_.at(i); } - inline const FeatureStats& get(int i)const{ return array_.at(i); } + inline FeatureStats& get(size_t i){ return array_.at(i); } + inline const FeatureStats& get(size_t i)const{ return array_.at(i); } void add(FeatureStats e){ array_.push_back(e); } void merge(FeatureArray& e); inline size_t size(){ return array_.size(); } - + inline size_t NumberOfFeatures(){ return (array_.size()>0)?array_.at(0).size():0; } void savetxt(ofstream& outFile); void savebin(ofstream& outFile); @@ -62,6 +62,7 @@ public: void load(ifstream& inFile, bool bin=false); void load(const std::string &file, bool bin=false); + bool check_consistency(); }; |