We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 44aba2f commit 8e1ad7eCopy full SHA for 8e1ad7e
machine/corpora/aligned_word_pair.py
@@ -26,7 +26,7 @@ def convert_to_num(token: str) -> int:
26
alignment_score = -1
27
28
second_colon_index = -1
29
- if colon_index > 0:
+ if colon_index < len(token):
30
second_colon_index = token.find(":", colon_index + 1)
31
if second_colon_index > 0:
32
translation_score = float(token[colon_index + 1 : second_colon_index])
0 commit comments