Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTetsuo Kiso <tetsuo-s@is.naist.jp>2012-03-07 02:07:29 +0400
committerTetsuo Kiso <tetsuo-s@is.naist.jp>2012-03-07 02:07:29 +0400
commit07d42f7614425bdb2db5c74bed5193a090d945c4 (patch)
tree41b7341b47c83ab72ff5b2c9d002189d4c947c8a /mert/Data.cpp
parent6b1dfa34340b4f9fd2009ed73d626413ce6894b3 (diff)
Remove an unused variable.
Diffstat (limited to 'mert/Data.cpp')
-rw-r--r--mert/Data.cpp17
1 files changed, 7 insertions, 10 deletions
diff --git a/mert/Data.cpp b/mert/Data.cpp
index 4ab97a4dd..93b193774 100644
--- a/mert/Data.cpp
+++ b/mert/Data.cpp
@@ -131,26 +131,23 @@ void Data::remove_duplicates() {
void Data::loadnbest(const std::string &file)
{
TRACE_ERR("loading nbest from " << file << std::endl);
-
- ScoreStats scoreentry;
-
inputfilestream inp(file); // matches a stream with a file. Opens the file
-
if (!inp.good())
throw runtime_error("Unable to open: " + file);
- std::string subsubstring, stringBuf;
+ ScoreStats scoreentry;
+ std::string line;
std::string sentence_index, sentence, feature_str;
std::string::size_type loc;
- while (getline(inp,stringBuf,'\n')) {
- if (stringBuf.empty()) continue;
+ while (getline(inp, line, '\n')) {
+ if (line.empty()) continue;
// adding statistics for error measures
scoreentry.clear();
- getNextPound(stringBuf, sentence_index, "|||"); // first field
- getNextPound(stringBuf, sentence, "|||"); // second field
- getNextPound(stringBuf, feature_str, "|||"); // third field
+ getNextPound(line, sentence_index, "|||"); // first field
+ getNextPound(line, sentence, "|||"); // second field
+ getNextPound(line, feature_str, "|||"); // third field
theScorer->prepareStats(sentence_index, sentence, scoreentry);
scoredata->add(scoreentry, sentence_index);