#double-array #sentence-piece #darts #precompiled-charsmap

spm_precompiled

This crate aims to emulate https://github.com/google/sentencepiece Dart::DoubleArray struct and it's Normalizer. This crate is highly specialized and not intended for general use.

5 releases

0.1.4 May 30, 2022
0.1.3 Jul 19, 2021
0.1.2 Sep 17, 2020
0.1.1 Sep 15, 2020
0.1.0 Sep 15, 2020

#804 in Development tools

Download history 8809/week @ 2023-12-23 11409/week @ 2023-12-30 16492/week @ 2024-01-06 20279/week @ 2024-01-13 19713/week @ 2024-01-20 21252/week @ 2024-01-27 21517/week @ 2024-02-03 24772/week @ 2024-02-10 26991/week @ 2024-02-17 34016/week @ 2024-02-24 31849/week @ 2024-03-02 30058/week @ 2024-03-09 30382/week @ 2024-03-16 32361/week @ 2024-03-23 30646/week @ 2024-03-30 29669/week @ 2024-04-06

128,226 downloads per month
Used in 65 crates (2 directly)

Apache-2.0

2MB
16K SLoC

Crate API

spm_precompiled

This crate aims to emulate https://github.com/google/sentencepiece Dart::DoubleArray struct and it's Normalizer. It's main intent is to be used with tokenizers that is a Rust library that aims to provide facilities to tokenize string for use with HuggingFace's transformers library

This crate is highly specialized and not intended for general use.

The core of the algorithm is to read spm's binary precompiled_charsmap.


lib.rs:

This crate aims to emulate https://github.com/google/sentencepiece Dart::DoubleArray struct and it's Normalizer. It's main intent is to be used with tokenizers that is a Rust library that aims to provide facilities to tokenize string for use with HuggingFace's transformers library

This crate is highly specialized and not intended for general use.

The core of the algorithm is to read spm's binary precompiled_charsmap.

Dependencies

~2–2.8MB
~53K SLoC