Skip to content

Commit

Permalink
Merge pull request PaddlePaddle#1519 from TmengT/TmengT-patch-1
Browse files Browse the repository at this point in the history
Update knowledge_mining.py
  • Loading branch information
wawltor authored Dec 29, 2021
2 parents dcabd4f + 588e5de commit 6277abf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion paddlenlp/taskflow/knowledge_mining.py
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ def _decode(self, batch_texts, batch_pred_tags):
for i, pred_tags in enumerate(batch_pred_tags):
pred_words, pred_word = [], []
text = batch_texts[i]
for j, tag in enumerate(pred_tags[self.summary_num:-1]):
for j, tag in enumerate(pred_tags[self.summary_num:]):
if j >= len(text):
break
pred_label = self._index_to_tags[tag]
Expand Down

0 comments on commit 6277abf

Please sign in to comment.