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 #include +#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_; }; - -// 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 #include #include @@ -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 {