summaryrefslogtreecommitdiff
path: root/decoder/dict.cc
diff options
context:
space:
mode:
Diffstat (limited to 'decoder/dict.cc')
-rw-r--r--decoder/dict.cc11
1 files changed, 11 insertions, 0 deletions
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 <string>
+#include <vector>
+#include <boost/regex.hpp>
+#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("\\|\\|\\|"));
+}
+