summaryrefslogtreecommitdiff
path: root/text_recognizer/data/iam_preprocessor.py
diff options
context:
space:
mode:
Diffstat (limited to 'text_recognizer/data/iam_preprocessor.py')
-rw-r--r--text_recognizer/data/iam_preprocessor.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/text_recognizer/data/iam_preprocessor.py b/text_recognizer/data/iam_preprocessor.py
index b5f72da..506036e 100644
--- a/text_recognizer/data/iam_preprocessor.py
+++ b/text_recognizer/data/iam_preprocessor.py
@@ -89,9 +89,9 @@ class Preprocessor:
self.lexicon = None
if self.special_tokens is not None:
- self.special_tokens += ("#", "*")
- self.tokens += self.special_tokens
- self.graphemes += self.special_tokens
+ special_tokens_ = (*self.special_tokens, "#", "*")
+ self.tokens += special_tokens_
+ self.graphemes += special_tokens_
self.graphemes_to_index = {t: i for i, t in enumerate(self.graphemes)}
self.tokens_to_index = {t: i for i, t in enumerate(self.tokens)}