From 7d3557c846bc51bbbaa04794690501dad6c3b27e Mon Sep 17 00:00:00 2001 From: redpony Date: Tue, 29 Jun 2010 17:21:28 +0000 Subject: isolate warning messages git-svn-id: https://ws10smt.googlecode.com/svn/trunk@56 ec762483-ff6d-05da-a07a-a48fb63a330f --- decoder/Makefile.am | 1 + decoder/dict.cc | 11 +++++++++++ decoder/dict.h | 8 +------- 3 files changed, 13 insertions(+), 7 deletions(-) create mode 100644 decoder/dict.cc (limited to 'decoder') diff --git a/decoder/Makefile.am b/decoder/Makefile.am index 44d6adc8..fd4589e4 100644 --- a/decoder/Makefile.am +++ b/decoder/Makefile.am @@ -47,6 +47,7 @@ libcdec_a_SOURCES = \ rule_lexer.cc \ fst_translator.cc \ csplit.cc \ + dict.cc \ translator.cc \ scfg_translator.cc \ hg.cc \ diff --git a/decoder/dict.cc b/decoder/dict.cc new file mode 100644 index 00000000..485fa348 --- /dev/null +++ b/decoder/dict.cc @@ -0,0 +1,11 @@ +#include "dict.h" + +#include +#include +#include +#include + +void Dict::AsVector(const WordID& id, std::vector* results) const { + boost::algorithm::split_regex(*results, Convert(id), boost::regex("\\|\\|\\|")); +} + diff --git a/decoder/dict.h b/decoder/dict.h index 39baf6ed..1c8ebb67 100644 --- a/decoder/dict.h +++ b/decoder/dict.h @@ -8,8 +8,6 @@ #include #include -#include -#include #include "wordid.h" @@ -51,11 +49,7 @@ class Dict { return words_[id-1]; } - inline std::vector AsVector(const WordID& id) const { - std::vector result; - boost::algorithm::split_regex(result, Convert(id), boost::regex("\\|\\|\\|")); - return result; - } + void AsVector(const WordID& id, std::vector* results) const; void clear() { words_.clear(); d_.clear(); } -- cgit v1.2.3