Skip to content

Commit

Permalink
update nlp utils to avoid redefining loop var
Browse files Browse the repository at this point in the history
Signed-off-by: Jason <jasoli@nvidia.com>
  • Loading branch information
blisc committed Jan 22, 2020
1 parent e18015d commit c84cc56
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions collections/nemo_nlp/nemo_nlp/data/datasets/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -875,8 +875,8 @@ def process_intent_slot_mturk(slot_annotations, agreed_all, intent_names,
slotlist.append(all_labels.get('O'))
anno_words = utterance[tags['startOffset']:tags['endOffset']]
# tagging with the IOB format.
for i, word in enumerate(anno_words.split()):
if i == 0:
for j, _ in enumerate(anno_words.split()):
if j == 0:
b_slot = 'B-' + tags['label']
slotlist.append(all_labels.get(b_slot))
else:
Expand Down

0 comments on commit c84cc56

Please sign in to comment.