Skip to content

Commit

Permalink
Updated the document
Browse files Browse the repository at this point in the history
  • Loading branch information
taku910 committed Aug 6, 2022
1 parent 655b944 commit 58f256c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion doc/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <sentencepiece.pb.h>
#include <sentencepiece_processor.h>
sentencepiece::ImmutableSentencePieceText spt;
Expand Down
13 changes: 10 additions & 3 deletions python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 58f256c

Please sign in to comment.