From 58f256cf6f01bb86e6fa634a5cc560de5bd1667d Mon Sep 17 00:00:00 2001 From: Taku Kudo Date: Sat, 6 Aug 2022 20:41:00 +0900 Subject: [PATCH] Updated the document --- doc/api.md | 2 +- python/README.md | 13 ++++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/doc/api.md b/doc/api.md index e3d639ed..ebde8806 100644 --- a/doc/api.md +++ b/doc/api.md @@ -80,7 +80,7 @@ You will want to use `ImmutableSentencePieceText` class to obtain the pieces and This proto also encodes a utf8-byte offset of each piece over user input or detokenized text. ```C++ -#include +#include sentencepiece::ImmutableSentencePieceText spt; diff --git a/python/README.md b/python/README.md index 0a12e99f..bc5a59a5 100644 --- a/python/README.md +++ b/python/README.md @@ -9,10 +9,17 @@ For Linux (x64/i686), macOS, and Windows(win32/x64) environment, you can simply % pip install sentencepiece ``` -To build and install the Python wrapper from source, please install [SentencePiece C++](https://github.com/google/sentencepiece#c-from-source) and try the following commands: +To build and install the Python wrapper from source, try the following commands to build and install wheel package. ``` -% python setup.py build -% sudo python setup.py install +% git clone https://github.com/google/sentencepiece.git +% cd sentencepiece +% mkdir build +% cd build +% cmake .. -DSPM_ENABLE_SHARED=OFF -DCMAKE_INSTALL_PREFIX=./root +% make install +% cd ../python +% python setup.py bdist_wheel +% pip install dist/sentencepiece*.whl ``` If you don’t have write permission to the global site-packages directory or don’t want to install into it, please try: