remove boost::split

This commit is contained in:
Marcin Junczys-Dowmunt 2016-04-14 14:53:40 +02:00
parent 14457d0c58
commit 3bc0485b73
2 changed files with 4 additions and 4 deletions

View File

@ -18,12 +18,12 @@ cuda_add_executable(
)
cuda_add_executable(
amunn_rescorer
rescorer
rescorer/rescorer_main.cu
$<TARGET_OBJECTS:libamunn>
)
foreach(exec amunn amunn_rescorer)
foreach(exec amunn rescorer)
target_link_libraries(${exec} ${EXT_LIBS})
cuda_add_cublas_to_target(${exec})
set_target_properties(${exec} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")

View File

@ -21,6 +21,7 @@
#include "dl4mt.h"
#include "vocab.h"
#include "hypothesis.h"
#include "utils.h"
#define EOL "</s>"
@ -51,8 +52,7 @@ class Search {
std::string Decode(const std::string& source, size_t beamSize = 12) {
// this should happen somewhere else
std::vector<std::string> sourceSplit;
boost::split(sourceSplit, source, boost::is_any_of(" "),
boost::token_compress_on);
Split(source, sourceSplit, " ");
std::vector<size_t> sourceWords(sourceSplit.size());
std::transform(sourceSplit.begin(), sourceSplit.end(), sourceWords.begin(),
[&](const std::string& w) { return svcb_[w]; });