Skip to content

Commit

Permalink
Fix escaping of '
Browse files Browse the repository at this point in the history
  • Loading branch information
gaigutherz committed Apr 4, 2022
1 parent cc2c54f commit 52a877a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion akkadian/translate_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def detokenize_translation(line, include_line_number=False):
del splitted[1]

tokenized = ' '.join(splitted[1:])
translation = tokenized.replace('▁', '').replace(' ,', ',').replace(' .', '.').replace('- ', '-').replace(' -', '-').replace(' !', '!').replace(' ?', '?').replace(' ;', ';').replace(' '', ''').replace('' ', ''')
translation = tokenized.replace('▁', '').replace(' ,', ',').replace(' .', '.').replace('- ', '-').replace(' -', '-').replace(' !', '!').replace(' ?', '?').replace(' ;', ';').replace(' \'', '\'').replace('\' ', '\'')
if include_line_number:
return splitted[0] + ' ' + translation
return translation

0 comments on commit 52a877a

Please sign in to comment.