diff options
author | redpony <redpony@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-08-11 02:37:10 +0000 |
---|---|---|
committer | redpony <redpony@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-08-11 02:37:10 +0000 |
commit | 80686d4e567bae579ea39e009826a2de92cd4ace (patch) | |
tree | c3c35fcba57dde423a248f38aa121ad197c79734 /decoder/dict.cc | |
parent | 3c85c407c333899f6b4bc26632d312b8e568b638 (diff) |
major refactor, break bad circular deps
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@509 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'decoder/dict.cc')
-rw-r--r-- | decoder/dict.cc | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/decoder/dict.cc b/decoder/dict.cc deleted file mode 100644 index 2d6986c8..00000000 --- a/decoder/dict.cc +++ /dev/null @@ -1,27 +0,0 @@ -#include "dict.h" - -#include <string> -#include <vector> - -void TokenizeStringSeparator( - const std::string& str, - const std::string& separator, - std::vector<std::string>* tokens) { - - size_t pos = 0; - std::string::size_type nextPos = str.find(separator, pos); - - while (nextPos != std::string::npos) { - tokens->push_back(str.substr(pos, nextPos - pos)); - pos = nextPos + separator.size(); - nextPos = str.find(separator, pos); - } - tokens->push_back(str.substr(pos, nextPos - pos)); -} - - -void Dict::AsVector(const WordID& id, std::vector<std::string>* results) const { - results->clear(); - TokenizeStringSeparator(Convert(id), " ||| ", results); -} - |