Skip to content

Commit

Permalink
nltk#2918 potential loop variable fix
Browse files Browse the repository at this point in the history
  • Loading branch information
gokulnath27 committed Apr 29, 2022
1 parent 6f18915 commit aab5373
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion nltk/sem/boxer.py
Original file line number Diff line number Diff line change
Expand Up @@ -530,11 +530,15 @@ def _handle_time_expression(self, arg):
else:
return None
self.assertToken(self.token(), ")")

conda_result = []
for cond in conds:
conda_result.append(lambda sent_index, word_indices: cond)
return [
lambda sent_index, word_indices: BoxerPred(
self.discourse_id, sent_index, word_indices, arg, tok, "n", 0
)
] + [lambda sent_index, word_indices: cond for cond in conds]
] + conda_result

def _handle_date(self, arg):
# []: (+), []:'XXXX', [1004]:'04', []:'XX'
Expand Down

0 comments on commit aab5373

Please sign in to comment.