aboutsummaryrefslogtreecommitdiff
path: root/liblangdet/sentencepiece.c
diff options
context:
space:
mode:
authorOnur Gündüz <ogunduz@gmail.com>2026-09-29 13:40:12 +0200
committerOnur Gündüz <ogunduz@gmail.com>2026-09-29 13:40:12 +0200
commitcb1a04331b27cc19445de63cedcd4fd30b8a9016 (patch)
tree85edb98bacb5ce8da99245343f22fe58e594229b /liblangdet/sentencepiece.c
parent53c1b6591b5d237637cbb7bd251cfdcf9f4a554a (diff)
downloadlangdet-cb1a04331b27cc19445de63cedcd4fd30b8a9016.tar.gz
langdet-cb1a04331b27cc19445de63cedcd4fd30b8a9016.zip
Expose complete language prediction API and simplify CLI
Diffstat (limited to 'liblangdet/sentencepiece.c')
-rw-r--r--liblangdet/sentencepiece.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/liblangdet/sentencepiece.c b/liblangdet/sentencepiece.c
index 6c30ba1..33efab8 100644
--- a/liblangdet/sentencepiece.c
+++ b/liblangdet/sentencepiece.c
@@ -856,7 +856,7 @@ int *tok_spm_encode_with_workspace(const tok_spm_t *tok,
const char *text,
int *out_n_tokens) {
if (out_n_tokens)
- *out_n_tokens = 0;
+ *out_n_tokens = -1;
if (!tok || !ws || !text)
return NULL;
int n = 0;