PackageTrack
Sign in Get early access

bert_tokenizer

Pure Dart WordPiece tokenizer for BERT NLP models. Completely independent of Flutter.

1.2.0 TheDS-EXE/bert_tokenizer

What this package is like to depend on

Last release 11 days ago

12 Aug 2026

Ships on a steady schedule

a new release about every 2 weeks

Nearly every release is documented

notes for 7 of 7 stable releases

Nothing withdrawn

no release was ever pulled

2 months old

7 releases · first in 2026

7 releases in the last 12 months

see the full history below

Release timeline

7 releases · Jun 2026 to Aug 2026
Release Pre-release

Releases

latest 7
  1. 1.2.0 12 Aug 2026
    Release notes
    • Added batch processing (prepareBatch) and support for pre‑tokenized input (prepareFromTokens).
    • Introduced left/right truncation strategy (TruncationStrategy) and custom segment ID override (per‑token or global).
    • Exposed special token IDs via getters (padTokenId, unkTokenId, etc.) for easy access.
    • Optimised padding with pre‑allocated lists for better performance.
    • Preserved leading/trailing whitespace in vocabulary (only strips \r for cross‑platform compatibility).
    Open source →
  2. 1.1.2 17 Jul 2026
    Release notes
    • Upgraded the Example Code: Replaced the basic example script with a comprehensive, multi-step version that demonstrates raw string tokenization, ML input preparation, and reversing numerical IDs back to text.
    Open source →
  3. 1.1.1 02 Jul 2026
    Release notes
    • Resolved regex syntax errors by utilizing raw triple quotes for the punctuation character class.

    • Enforced strict WordPiece standard (entire word becomes [UNK] if any subword fails).

    • Added toLowerCase parameter for cased/uncased model flexibility.

    • Added pre-tokenization stripping of invisible control characters.

    • Robust line ending handling (\r\n and \n) for cross-platform vocab loading.

    Open source →
  4. 1.1.0 17 Jun 2026
    Release notes
    • Fixed Truncation Crash: Rewrote the sequence length handling in prepareNerInput to prevent unhandled StateError exceptions when maxLength is set to small values (like 0 or 1).

    • Preserved Special Tokens: Adjusted the truncation logic to trim the raw word pieces before injecting the [CLS] and [SEP] tokens, ensuring the structural markers required by BERT models are never overwritten.

    • Enforced Minimum Bounds: Added an ArgumentError validation check to prepareNerInput ensuring maxLength is at least 2, which is the mathematical minimum required to contain the mandatory start and end tokens.

    • Added Initialization Validation: Updated fromStringContent to verify that both [UNK] and [PAD] are explicitly defined within the parsed vocabulary map, replacing late-stage runtime crashes (!) with a descriptive FormatException during setup.

    Open source →
  5. 1.0.2 06 Jun 2026
    Release notes
    • Update pub.dev visibility.
    Open source →
  6. 1.0.1 01 Jun 2026
    Release notes
    • Fix documentation links and update repository visibility.
    Open source →
  7. 1.0.0 01 Jun 2026
    Release notes
    • Initial release of pure Dart BERT tokenizer.
    Open source →

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive