Fixed windows build failure

This commit is contained in:
Taku Kudo 2020-05-10 02:01:28 +09:00
parent 205be38f59
commit 70494e894c
3 changed files with 9 additions and 9 deletions

View File

@ -12,11 +12,10 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License.! // limitations under the License.!
#include "bpe_model.h"
#include <cstdio> #include <cstdio>
#include <string> #include <string>
#include "bpe_model.h"
#include "model_interface.h" #include "model_interface.h"
#include "testharness.h" #include "testharness.h"

View File

@ -98,11 +98,6 @@ class Status {
struct Rep; struct Rep;
std::unique_ptr<Rep> 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 } // namespace util
// SentencePieceProcessor: // SentencePieceProcessor:
@ -176,6 +171,13 @@ enum class EncoderVersion {
// just in case). // 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 { class SentencePieceProcessor {
public: public:
SentencePieceProcessor(); SentencePieceProcessor();

View File

@ -12,8 +12,6 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License.! // limitations under the License.!
#include "unigram_model.h"
#include <cmath> #include <cmath>
#include <map> #include <map>
#include <string> #include <string>
@ -24,6 +22,7 @@
#include "testharness.h" #include "testharness.h"
#include "third_party/absl/strings/str_cat.h" #include "third_party/absl/strings/str_cat.h"
#include "third_party/absl/strings/str_join.h" #include "third_party/absl/strings/str_join.h"
#include "unigram_model.h"
#include "util.h" #include "util.h"
namespace sentencepiece { namespace sentencepiece {