Skip to content

Latest commit

 

History

History
27 lines (16 loc) · 963 Bytes

README.md

File metadata and controls

27 lines (16 loc) · 963 Bytes

SentencePiece Java Wrapper

Build Status

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.

SentencePiece Version

v0.1.92

Build and Install SentencePiece

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.

Usage

See SentencePieceProcessorTest for more.