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>2017-03-08 08:58:16 +0300
committerTaku Kudo <taku@google.com>2017-03-08 08:58:16 +0300
commitce1a61bebaddda1443d13057027e937098167fb2 (patch)
tree421cb045caaac56caa6955f9a9720b655435a60d /src/bpe_model_trainer.cc
parent99049a4af9e779700f36f7d28d5bb7dc3fcbcfbc (diff)
Fixed typo in README.md. Fixed the description for protobuf. Fixed the bug in bpe_train
Diffstat (limited to 'src/bpe_model_trainer.cc')
-rw-r--r--src/bpe_model_trainer.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/bpe_model_trainer.cc b/src/bpe_model_trainer.cc
index f80dd75..62892ae 100644
--- a/src/bpe_model_trainer.cc
+++ b/src/bpe_model_trainer.cc
@@ -261,8 +261,8 @@ void Trainer::Train() {
}
// Stores the best_symbol in the final output.
- const float score = -final_pieces_.size();
- final_pieces_.emplace_back(best_symbol->ToString(), score);
+ final_pieces_.emplace_back(best_symbol->ToString(),
+ -static_cast<float>(final_pieces_.size()));
if (final_pieces_.size() % 20 == 0) {
LOG(INFO) << "Added: freq=" << best_symbol->freq
@@ -311,8 +311,8 @@ void Trainer::Train() {
// Adds required_chars_
for (const auto &w : Sorted(required_chars_)) {
const Symbol *symbol = GetCharSymbol(w.first);
- const float score = -final_pieces_.size();
- final_pieces_.emplace_back(symbol->ToString(), score);
+ final_pieces_.emplace_back(symbol->ToString(),
+ -static_cast<float>(final_pieces_.size()));
}
Save();