From 17b0e48c2bee30d2d062d94611cae4ad443702d2 Mon Sep 17 00:00:00 2001 From: Benjamin Kiessling Date: Fri, 5 Apr 2024 21:55:03 +0200 Subject: [PATCH] set strict on sentencepiececodec --- kraken/lib/codec.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kraken/lib/codec.py b/kraken/lib/codec.py index c6fb95958..32990e278 100644 --- a/kraken/lib/codec.py +++ b/kraken/lib/codec.py @@ -304,6 +304,8 @@ def __init__(self, character_coverage=1.0) self.spp = spm.SentencePieceProcessor(model_proto=_model.getvalue()) + self.strict = strict + def __len__(self) -> int: """ Total number of input labels the codec can decode.