diff options
author | graehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-07-20 22:44:40 +0000 |
---|---|---|
committer | graehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-07-20 22:44:40 +0000 |
commit | 0720de0bee526e8e9b311bb91d0a3a1efa8c1438 (patch) | |
tree | 10f4f50fbaff6c8ecec0c68a72a31c3aa0d3d2a9 /decoder/tdict.h | |
parent | ac98d8465d9b7a6faf2b51bcd18260375842f6c8 (diff) |
beautiful (?) low-level tokenization to fix valgrind problem with previous TD string->Sentence
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@345 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'decoder/tdict.h')
-rw-r--r-- | decoder/tdict.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/decoder/tdict.h b/decoder/tdict.h index af1612ba..6b90becb 100644 --- a/decoder/tdict.h +++ b/decoder/tdict.h @@ -9,7 +9,7 @@ class Vocab; struct TD { static Vocab dict_; - static void ConvertSentence(const std::string& sent, std::vector<WordID>* ids); + static void ConvertSentence(std::string const& sent, std::vector<WordID>* ids); static void GetWordIDs(const std::vector<std::string>& strings, std::vector<WordID>* ids); static std::string GetString(const std::vector<WordID>& str); static int AppendString(const WordID& w, int pos, int bufsize, char* buffer) { @@ -25,6 +25,7 @@ struct TD { } static unsigned int NumWords(); static WordID Convert(const std::string& s); + static WordID Convert(char const* s); static const char* Convert(const WordID& w); }; |