#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

#841 in Development tools

Download history 30565/week @ 2024-03-14 32533/week @ 2024-03-21 28356/week @ 2024-03-28 35183/week @ 2024-04-04 35652/week @ 2024-04-11 39380/week @ 2024-04-18 36809/week @ 2024-04-25 41008/week @ 2024-05-02 37521/week @ 2024-05-09 53978/week @ 2024-05-16 51915/week @ 2024-05-23 57076/week @ 2024-05-30 57343/week @ 2024-06-06 58672/week @ 2024-06-13 57904/week @ 2024-06-20 45990/week @ 2024-06-27

231,492 downloads per month
Used in 78 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.9MB
~54K SLoC