Skip to content

Commit

Permalink
attention ocr
Browse files Browse the repository at this point in the history
  • Loading branch information
zhang0jhon committed Nov 7, 2019
1 parent a2eb8da commit ba46051
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions parse_dict.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,11 @@ def get_dict(path=os.path.join(currentdir, 'label_dict/icdar_labels.txt'), add_s
idx, label = int(m.group(1)), m.group(2)
label_dict[idx] = label
if add_space:
label_dict[idx+1] = ' '
idx = idx + 1
label_dict[idx] = ' '
if add_eos:
label_dict[idx+2] = 'EOS'
idx = idx + 1
label_dict[idx] = 'EOS'
return label_dict


Expand Down

0 comments on commit ba46051

Please sign in to comment.