mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-09-11 19:27:11 +03:00
fixed another bug related to the handling of feature names
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@1822 1f5c12ca-751b-0410-a591-d2e778427230
This commit is contained in:
parent
44d7e0e0f7
commit
930e67c5e3
@ -65,7 +65,7 @@ public:
|
||||
bool existsFeatureNames(){ return (idx2featname_.size() > 0)?true:false; };
|
||||
std::string getFeatureName(size_t idx){
|
||||
if (idx >= idx2featname_.size())
|
||||
throw runtime_error("Error: you required the " + idx + "-th feature, but there are only " + (idx2featname_.size()) + " features");
|
||||
throw runtime_error("Error: you required an too big index");
|
||||
return idx2featname_[idx];
|
||||
};
|
||||
size_t getFeatureIndex(const std::string& name){
|
||||
|
Loading…
Reference in New Issue
Block a user