From 0ee6e480044ce6e4fc5acebaf3756dc587416f97 Mon Sep 17 00:00:00 2001 From: Christian Risi <75698846+CnF-Gris@users.noreply.github.com> Date: Fri, 3 Oct 2025 16:09:53 +0200 Subject: [PATCH] Fixed the same bug as before, but this time is correct --- Project_Model/Libs/BPE/Classes/NanoSocratesBPE.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Project_Model/Libs/BPE/Classes/NanoSocratesBPE.py b/Project_Model/Libs/BPE/Classes/NanoSocratesBPE.py index a74412d..a5dab9b 100644 --- a/Project_Model/Libs/BPE/Classes/NanoSocratesBPE.py +++ b/Project_Model/Libs/BPE/Classes/NanoSocratesBPE.py @@ -163,10 +163,10 @@ class NanoSocratesBPE(Encoder): # in this case there was a candidate token to substitute the couple of element NEW_PIECE.append(CANDIDATE_TOKEN) - index += 1 + index += 2 + if index == PIECE_LENGTH: NEW_PIECE.append(piece[index]) - index += 1 return NEW_PIECE