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/Types.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/Types.h')
-rw-r--r-- | mert/Types.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mert/Types.h b/mert/Types.h index b4c03a89a..0ea9614d9 100644 --- a/mert/Types.h +++ b/mert/Types.h @@ -39,8 +39,8 @@ typedef ScoreStatsType* scorestats_t; typedef std::vector<ScoreStats> scorearray_t; typedef std::vector<ScoreArray> scoredata_t; -typedef std::map<std::size_t, std::string> idx2name; -typedef std::map<std::string, std::size_t> name2idx; +typedef std::map<std::size_t, int> idx2name; +typedef std::map<int, std::size_t> name2idx; typedef enum { HAMMING_DISTANCE=0, KENDALL_DISTANCE } distanceMetric_t; typedef enum { REFERENCE_CHOICE_AVERAGE=0, REFERENCE_CHOICE_CLOSEST } distanceMetricReferenceChoice_t; |