diff options
author | Taku Kudo <taku@google.com> | 2020-05-09 20:01:28 +0300 |
---|---|---|
committer | Taku Kudo <taku@google.com> | 2020-05-09 20:01:28 +0300 |
commit | 70494e894c465291758faf9f778502d9d261e065 (patch) | |
tree | 32aefc89f023cc4248c36ef10e847d32a4f18536 | |
parent | 205be38f59b70f439a8502e874c1685da7213d61 (diff) |
Fixed windows build failure
-rw-r--r-- | src/bpe_model_test.cc | 3 | ||||
-rw-r--r-- | src/sentencepiece_processor.h | 12 | ||||
-rw-r--r-- | src/unigram_model_test.cc | 3 |
3 files changed, 9 insertions, 9 deletions
diff --git a/src/bpe_model_test.cc b/src/bpe_model_test.cc index ccd0066..42d4062 100644 --- a/src/bpe_model_test.cc +++ b/src/bpe_model_test.cc @@ -12,11 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License.! -#include "bpe_model.h" - #include <cstdio> #include <string> +#include "bpe_model.h" #include "model_interface.h" #include "testharness.h" diff --git a/src/sentencepiece_processor.h b/src/sentencepiece_processor.h index ce7d61c..dfef468 100644 --- a/src/sentencepiece_processor.h +++ b/src/sentencepiece_processor.h @@ -98,11 +98,6 @@ class Status { struct Rep; std::unique_ptr<Rep> rep_; }; - -// Redefine std::string for serialized_proto interface as Python's string is -// a Unicode string. We can enforce the return value to be raw byte sequence -// with SWIG's typemap. -using bytes = std::string; } // namespace util // SentencePieceProcessor: @@ -176,6 +171,13 @@ enum class EncoderVersion { // just in case). }; +namespace util { +// Redefine std::string for serialized_proto interface as Python's string is +// a Unicode string. We can enforce the return value to be raw byte sequence +// with SWIG's typemap. +using bytes = std::string; +} // namespace util + class SentencePieceProcessor { public: SentencePieceProcessor(); diff --git a/src/unigram_model_test.cc b/src/unigram_model_test.cc index d6375e7..e8ea0c6 100644 --- a/src/unigram_model_test.cc +++ b/src/unigram_model_test.cc @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License.! -#include "unigram_model.h" - #include <cmath> #include <map> #include <string> @@ -24,6 +22,7 @@ #include "testharness.h" #include "third_party/absl/strings/str_cat.h" #include "third_party/absl/strings/str_join.h" +#include "unigram_model.h" #include "util.h" namespace sentencepiece { |