36 #ifndef RERANKER_BASIC_FILE_BACKED_FEATURE_EXTRACTOR_H_
37 #define RERANKER_BASIC_FILE_BACKED_FEATURE_EXTRACTOR_H_
98 string &feature,
double &value) {
99 size_t equals_pos = s.find_last_of(
"=");
100 bool found_equals = equals_pos != string::npos;
102 found_equals && equals_pos < s.length() - 1 ?
103 atof(s.substr(equals_pos + 1, s.length() - (equals_pos + 1)).c_str()) :
105 feature = found_equals ? s.substr(0, equals_pos) : s;
A class to represent a candidate in a set of candidates that constitutes a training instance for a re...