diff options
author | philblunsom <philblunsom@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-07-19 17:01:19 +0000 |
---|---|---|
committer | philblunsom <philblunsom@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-07-19 17:01:19 +0000 |
commit | 1eb8cf39863b166e87a3115c682e873dbe091582 (patch) | |
tree | 08416a77c0a21f21548ca64261b2fc72d7bc76a7 | |
parent | b79870642f5521e37aaaec87283eceea8a36dbea (diff) |
Changed string delimiter, hope this doesn't screw anything up ...
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@316 ec762483-ff6d-05da-a07a-a48fb63a330f
-rw-r--r-- | decoder/dict.cc | 2 | ||||
-rw-r--r-- | decoder/dict.h | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/decoder/dict.cc b/decoder/dict.cc index 485fa348..5b0882e6 100644 --- a/decoder/dict.cc +++ b/decoder/dict.cc @@ -6,6 +6,6 @@ #include <boost/algorithm/string/regex.hpp> void Dict::AsVector(const WordID& id, std::vector<std::string>* results) const { - boost::algorithm::split_regex(*results, Convert(id), boost::regex("\\|\\|\\|")); + boost::algorithm::split_regex(*results, Convert(id), boost::regex(" \\|\\|\\| ")); } diff --git a/decoder/dict.h b/decoder/dict.h index e0ac9abd..38231db6 100644 --- a/decoder/dict.h +++ b/decoder/dict.h @@ -39,7 +39,7 @@ class Dict { std::string word= ""; for (std::vector<std::string>::const_iterator it=words.begin(); it != words.end(); ++it) { - if (it != words.begin()) word += "|||"; + if (it != words.begin()) word += " ||| "; word += *it; } return word; @@ -47,7 +47,7 @@ class Dict { inline const std::string& Convert(const WordID& id) const { if (id == 0) return b0_; - assert(id <= words_.size()); + assert(id <= (int)words_.size()); return words_[id-1]; } |