Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/marian-nmt/sentencepiece.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTaku Kudo <taku@google.com>2018-07-24 09:22:49 +0300
committerTaku Kudo <taku@google.com>2018-07-24 09:22:49 +0300
commit89831f80c125335a56807a1c738f2f509d03d6d5 (patch)
tree6d7dbfcaf2f195ae2d24017f6eee3049e2d7749f /src/bpe_model_trainer_test.cc
parentd64cc9ada66c4a601536b94e88132937f8768e9c (diff)
Switched to cmake
Diffstat (limited to 'src/bpe_model_trainer_test.cc')
-rw-r--r--src/bpe_model_trainer_test.cc18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/bpe_model_trainer_test.cc b/src/bpe_model_trainer_test.cc
index 71d49ba..01e3864 100644
--- a/src/bpe_model_trainer_test.cc
+++ b/src/bpe_model_trainer_test.cc
@@ -16,11 +16,14 @@
#include <string>
#include <vector>
+#include "flags.h"
#include "sentencepiece_processor.h"
#include "sentencepiece_trainer.h"
#include "testharness.h"
#include "util.h"
+DECLARE_string(data_dir);
+
namespace sentencepiece {
namespace bpe {
namespace {
@@ -87,13 +90,14 @@ TEST(BPETrainerTest, BasicTest) {
TEST(BPETrainerTest, EndToEndTest) {
const test::ScopedTempFile sf("tmp_model");
- EXPECT_OK(SentencePieceTrainer::Train(
- std::string("--model_prefix=") + sf.filename() +
- " --input=../data/wagahaiwa_nekodearu.txt"
- " --vocab_size=8000"
- " --normalization_rule_name=identity"
- " --model_type=bpe"
- " --control_symbols=<ctrl>"));
+ EXPECT_OK(SentencePieceTrainer::Train(std::string("--model_prefix=") +
+ sf.filename() +
+ " --input=" + FLAGS_data_dir +
+ "/wagahaiwa_nekodearu.txt"
+ " --vocab_size=8000"
+ " --normalization_rule_name=identity"
+ " --model_type=bpe"
+ " --control_symbols=<ctrl>"));
SentencePieceProcessor sp;
EXPECT_OK(sp.Load(std::string(sf.filename()) + ".model"));