Skip to content

Commit 58f256c

Browse files
committed
Updated the document
1 parent 655b944 commit 58f256c

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

Diff for: doc/api.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ You will want to use `ImmutableSentencePieceText` class to obtain the pieces and
8080
This proto also encodes a utf8-byte offset of each piece over user input or detokenized text.
8181
8282
```C++
83-
#include <sentencepiece.pb.h>
83+
#include <sentencepiece_processor.h>
8484
8585
sentencepiece::ImmutableSentencePieceText spt;
8686

Diff for: python/README.md

+10-3
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,17 @@ For Linux (x64/i686), macOS, and Windows(win32/x64) environment, you can simply
99
% pip install sentencepiece
1010
```
1111

12-
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:
12+
To build and install the Python wrapper from source, try the following commands to build and install wheel package.
1313
```
14-
% python setup.py build
15-
% sudo python setup.py install
14+
% git clone https://github.com/google/sentencepiece.git
15+
% cd sentencepiece
16+
% mkdir build
17+
% cd build
18+
% cmake .. -DSPM_ENABLE_SHARED=OFF -DCMAKE_INSTALL_PREFIX=./root
19+
% make install
20+
% cd ../python
21+
% python setup.py bdist_wheel
22+
% pip install dist/sentencepiece*.whl
1623
```
1724

1825
If you don’t have write permission to the global site-packages directory or don’t want to install into it, please try:

0 commit comments

Comments
 (0)