SentencePiece: A simple and language independent subword tokenizer and detokenizer for Neural Text Processing

Taku Kudo, John Richardson
8/19/2018
4,484 citations
cs.CL

Official code: google/sentencepiece (12,172 stars, C++, Apache-2.0, last commit 2026-10-20).

Abstract

This paper describes SentencePiece, a language-independent subword tokenizer and detokenizer designed for Neural-based text processing, including Neural Machine Translation. It provides open-source C++ and Python implementations for subword units.

Show full abstract

While existing subword segmentation tools assume that the input is pre-tokenized into word sequences, SentencePiece can train subword models directly from raw sentences, which allows us to make a purely end-to-end and language independent system. We perform a validation experiment of NMT on English-Japanese machine translation, and find that it is possible to achieve comparable accuracy to direct subword training from raw sentences. We also compare the performance of subword training and segmentation with various configurations. SentencePiece is available under the Apache 2 license at https://github.com/google/sentencepiece.

View on arXivView PDF

Code Implementations(1)

Apache-2.0

Unsupervised text tokenizer for Neural Network-based text generation.

12,1721,401C++, PythonMar 7, 20171 months agoApache-2.0
natural-language-processingneural-machine-translationword-segmentation

Similar Papers

Cite this paper

@article{kudo2018sentencepiece,
  title  = {SentencePiece: A simple and language independent subword tokenizer and detokenizer for Neural Text Processing},
  author = {Taku Kudo and John Richardson},
  year   = {2018},
  eprint = {1808.06226},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/1808.06226}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/1808.06226.svg)](https://codeofpaper.com/paper/1808.06226)

Discussion