Skip to content

Commit

Permalink
Fix sentence align bug
Browse files Browse the repository at this point in the history
  • Loading branch information
ProbablyFaiz committed Jun 15, 2024
1 parent 2b3870e commit f53ce00
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rl/utils/locate_passage.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@ def get_best_ngram_match(
)
for sent in para["sentences"]
]
start = min(sentences, key=lambda s: abs(s.start - start))["start"]
end = max(sentences, key=lambda s: abs(s.end - end))["end"]
start = min(sentences, key=lambda s: abs(s["start"] - start))["start"]
end = max(sentences, key=lambda s: abs(s["end"] - end))["end"]

return start, end

Expand Down

0 comments on commit f53ce00

Please sign in to comment.