Java wrapper for SentencePiece with JNI. This module wraps
sentencepiece::SentencePieceProcessor
class with the following modifications:
- Encode and Decode methods are re-defined as EncodeAsIds, EncodeAsPieces, DecodeIds and DecodePieces respectively.
- SentencePieceText proto is not supported.
To build and install the Java wrapper from source, please try the following commands:
% mvn clean install
Please note you need to have gcc, cmake and libnative installed.
See SentencePieceProcessorTest for more.