summaryrefslogtreecommitdiff
path: root/text_recognizer/data/iam_preprocessor.py
diff options
context:
space:
mode:
authorGustaf Rydholm <gustaf.rydholm@gmail.com>2021-04-15 22:05:24 +0200
committerGustaf Rydholm <gustaf.rydholm@gmail.com>2021-04-15 22:05:24 +0200
commitffa4be4bf4e3758e01d52a9c1f354a05a90b93de (patch)
tree33a0f51f60cb181ffc562b562a7d09fcc70c5cf5 /text_recognizer/data/iam_preprocessor.py
parent0ab820d3595e4f17d4f1f3c310e186692f65cc67 (diff)
Created mappings
Diffstat (limited to 'text_recognizer/data/iam_preprocessor.py')
-rw-r--r--text_recognizer/data/iam_preprocessor.py1
1 files changed, 0 insertions, 1 deletions
diff --git a/text_recognizer/data/iam_preprocessor.py b/text_recognizer/data/iam_preprocessor.py
index d85787e..60f8a9f 100644
--- a/text_recognizer/data/iam_preprocessor.py
+++ b/text_recognizer/data/iam_preprocessor.py
@@ -119,7 +119,6 @@ class Preprocessor:
continue
self.text.append(example["text"].lower())
-
def _to_index(self, line: str) -> torch.LongTensor:
if line in self.special_tokens:
return torch.LongTensor([self.tokens_to_index[line]])