Skip to content

Commit

Permalink
Fixed build vocab indexing issue (#2318)
Browse files Browse the repository at this point in the history
  • Loading branch information
anderleich authored Feb 16, 2023
1 parent 5e92f95 commit fcc205b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions onmt/bin/build_vocab.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ def build_sub_vocab(corpora, transforms, opts, n_sample, stride, offset):

if 'feats' in maybe_example['src']:
src_feats_lines = maybe_example['src']['feats']
for i in range(opts.n_src_feats):
sub_counter_src_feats[i].update(
src_feats_lines[i].split(' '))
for k in range(opts.n_src_feats):
sub_counter_src_feats[k].update(
src_feats_lines[k].split(' '))
else:
src_feats_lines = []

Expand Down

0 comments on commit fcc205b

Please sign in to comment.