diff options
author | Tetsuo Kiso <tetsuo-s@is.naist.jp> | 2012-12-06 20:39:22 +0400 |
---|---|---|
committer | Tetsuo Kiso <tetsuo-s@is.naist.jp> | 2012-12-06 20:39:22 +0400 |
commit | 38e145e556274a199e270cc9ede833491b0f1a86 (patch) | |
tree | bfb72802950e7e42cf8ac29e94289c2b60e85575 /mert/ScoreArray.h | |
parent | cd3fb3b831e5ca0821a735c0d075f5fd6e79296a (diff) |
Use util::TokenIter to tokenize n-best lists.
Reduce creating std::string objects, too. In both ScoreArray
and FeatureArray classes, the private members to track sentence
indices (namely, "m_index") were unnecessarily declared as
std::string, but it's better to directly declare them as 'int'.
Diffstat (limited to 'mert/ScoreArray.h')
-rw-r--r-- | mert/ScoreArray.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/mert/ScoreArray.h b/mert/ScoreArray.h index 12b9d7c70..5b6c748cb 100644 --- a/mert/ScoreArray.h +++ b/mert/ScoreArray.h @@ -17,7 +17,7 @@ namespace MosesTuning { - + const char SCORES_TXT_BEGIN[] = "SCORES_TXT_BEGIN_0"; const char SCORES_TXT_END[] = "SCORES_TXT_END_0"; const char SCORES_BIN_BEGIN[] = "SCORES_BIN_BEGIN_0"; @@ -32,7 +32,7 @@ class ScoreArray // indexx to identify the utterance. // It can differ from the index inside the vector. - std::string m_index; + int m_index; public: ScoreArray(); @@ -40,9 +40,9 @@ public: void clear() { m_array.clear(); } - std::string getIndex() const { return m_index; } + int getIndex() const { return m_index; } - void setIndex(const std::string& value) { m_index = value; } + void setIndex(int value) { m_index = value; } ScoreStats& get(std::size_t i) { return m_array.at(i); } |