mirror of
https://github.com/marian-nmt/marian.git
synced 2024-12-11 09:54:22 +03:00
remove boost::split
This commit is contained in:
parent
14457d0c58
commit
3bc0485b73
@ -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")
|
||||
|
@ -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]; });
|
||||
|
Loading…
Reference in New Issue
Block a user