R Implementation of Wordpiece Tokenization
Overview
Apply 'Wordpiece' (arXiv:1609.08144) tokenization to input text, given an appropriate vocabulary. The 'BERT' (arXiv:1810.04805) tokenization conventions are used by default.
- Implemented various speed improvements, improving speed and memory usage by over 1000x. (#27, @jonathanbratt)
- Removed purrr dependency. (#30, @jonthegeek)
From NEWS.md in the release
Install
Health
NOTERd filesr-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc, r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc, r-devel-windows-x86_64, r-oldrel-macos-arm64, r-oldrel-macos-x86_64, r-oldrel-windows-x86_64, r-patched-linux-x86_64, r-release-linux-x86_64, r-release-macos-arm64, r-release-macos-x86_64, r-release-windows-x86_64
checkRd: (-1) wordpiece_cache_dir.Rd:16-17: Lost braces in \itemize; meant \describe ? checkRd: (-1) wordpiece_cache_dir.Rd:18-19: Lost braces in \itemize; meant \describe ? checkRd: (-1) wordpiece_cache_dir.Rd:20-21: Lost braces in \itemize; meant \describe ?
NOTECRAN incoming feasibilityr-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc
Maintainer: ‘Jonathan Bratt <jonathan.bratt@macmillan.com>’ The Description field contains Apply 'Wordpiece' (<arXiv:1609.08144>) tokenization to input text, given an appropriate vocabulary. The 'BERT' (<arXiv:1810.04805>) Please refer to arXiv e-prints via their arXiv DOI <doi:10.48550/arXiv.YYMM.NNNNN>.
- NOTE13 NOTENow
- NOTE14 NOTE2026-03-10
Documentation
- Help pages
- 15 (9 internal)
- Examples that run
- 100%3 run in a plain check
- Exported functions with examples
- 43%
- Documented parameters
- 100%
- Return-value docs
- 86%
- Help pages citing references
- 0%
- Using wordpiece HTML
Downloads
Repository
- PRs merged (all time)
- 100%
- Median days to close, 50 most recently updated closed issues
- 8
- Median days to close, 50 most recently updated closed PRs
- 0
5 development-tooling and community-health practices detected across 4 families in the upstream repository
Checks run against github.com/macmillancontentscience/wordpiece on 2026-10-11.
Dependencies
Installing wordpiece adds 18 packages (12 with compiled code, 16 MB of source tarballs). Heaviest: stringi 11 MB, fs 1.4 MB, vctrs 1.0 MB.
Code & Tests
Datasets
People & History
Pick two releases to compare their code metrics.
- RR 4.6.0 released · 2026-04-24
- RR 4.5.0 released · 2025-04-11
- RR 4.4.0 released · 2024-04-24
- RR 4.3.0 released · 2023-04-21
- RR 4.2.0 released · 2022-04-22
- 2.1.3Latest
- 2.0.12021-10-18 · diff ↗ ·
removed 1 export
get_cache_diradded 4 exports
prepare_vocab, set_wordpiece_cache_dir, wordpiece_cache_dir, wordpiece_vocab - RR 4.1.0 released · 2021-05-18
- 1.0.22021-02-11
- RR 4.0.0 released · 2020-04-24
Package metadata
- First published
- 2021-02-11
- Total releases
- 3 / 5 yrs
- License
- Apache License (>= 2)
- Minimum R
- ≥ 3.3.0
- Download size
- 19 KB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("wordpiece")This package has no citation file, so citation() returns this entry built from DESCRIPTION.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-18, which the citation names so these numbers can be found later. More on citing and the projects behind them.