@mailwoman/sentencepiece-wasm 11.0.0 → 11.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/binding.cpp +3 -4
- package/build.sh +3 -5
- package/index.d.ts +7 -6
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -43,7 +43,7 @@ success and returns a status message on failure. Pass binary bytes directly.
|
|
|
43
43
|
A conversion to a JavaScript string changes the model bytes' encoding.
|
|
44
44
|
|
|
45
45
|
`encodeWithOffsets` returns piece strings, token IDs and corresponding
|
|
46
|
-
`begins`/`ends` arrays. Offsets count UTF-8 bytes in the input. They
|
|
46
|
+
`begins`/`ends` arrays. Offsets count UTF-8 bytes in the input. They're not
|
|
47
47
|
JavaScript UTF-16 string indexes. Convert them before indexing a JavaScript
|
|
48
48
|
string, or index the UTF-8 bytes directly.
|
|
49
49
|
|
package/binding.cpp
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
|
|
3
|
+
|
|
1
4
|
/**
|
|
2
|
-
* @copyright Sister Software
|
|
3
|
-
* @license AGPL-3.0
|
|
4
|
-
* @author Teffen Ellis, et al.
|
|
5
|
-
*
|
|
6
5
|
* Embind wrapper for google/sentencepiece v0.2.2 — the mailwoman tokenizer's WASM core (task #26,
|
|
7
6
|
* the SP 0.2.2 native-offsets change from the 2026-07-30 Latin tokenizer survey).
|
|
8
7
|
*
|
package/build.sh
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
#
|
|
3
|
-
#
|
|
4
|
-
|
|
5
|
-
# @author Teffen Ellis, et al.
|
|
6
|
-
#
|
|
2
|
+
# SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
|
|
3
|
+
# SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
|
|
4
|
+
|
|
7
5
|
# Build the committed `sentencepiece.mjs` loader and `sentencepiece.wasm` binary: google/sentencepiece at the pinned tag below,
|
|
8
6
|
# compiled to wasm with emscripten and linked against binding.cpp (the embind wrapper exposing
|
|
9
7
|
# native per-piece byte offsets — task #26).
|
package/index.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
|
|
3
|
+
|
|
1
4
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
* @author Teffen Ellis, et al.
|
|
5
|
+
* Type surface of the committed `sentencepiece.mjs` artifact, google/sentencepiece
|
|
6
|
+
* **v0.2.2** compiled to wasm with the native-offsets embind wrapper (`binding.cpp`).
|
|
5
7
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* `build.sh`. Bump the tag there and note it here.
|
|
8
|
+
* Rebuilt only by `build.sh`.
|
|
9
|
+
* Bump the tag there and note it here.
|
|
9
10
|
*/
|
|
10
11
|
|
|
11
12
|
/**
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mailwoman/sentencepiece-wasm",
|
|
3
|
-
"version": "11.
|
|
4
|
-
"description": "google/sentencepiece v0.2.2 compiled to WASM with a native-offsets binding — the tokenizer
|
|
3
|
+
"version": "11.1.0",
|
|
4
|
+
"description": "google/sentencepiece v0.2.2 compiled to WASM with a native-offsets binding — the rollback tokenizer runtime for @mailwoman/neural, which runs on @mailwoman/mtf. An ESM loader with the wasm beside it, no runtime deps; per-piece byte offsets come from SentencePiece itself instead of TS-side reconstruction.",
|
|
5
5
|
"license": "AGPL-3.0-only OR LicenseRef-Commercial",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|