Skip to content

Commit

Permalink
fix translation issues
Browse files Browse the repository at this point in the history
  • Loading branch information
matheusbach committed Nov 20, 2023
1 parent 0a4e960 commit dbc125c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions translate_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def unjoin_sentences(original_sentence: str, modified_sentence: str, separator:

# split by separator, remove double spaces and empty or only space strings from list
original_lines = original_sentence.split(separator)
original_lines = [s.strip().replace(' ', ' ').lstrip(" ,.:;)")
original_lines = [s.strip().replace(' ', ' ').lstrip(" ,.:;)") if s.strip().replace(' ', ' ').lstrip(" ,.:;)") else s
for s in original_lines if s.strip()]
original_lines = [s for s in original_lines if s]
original_lines = [s for s in original_lines if s.strip()]
Expand All @@ -175,7 +175,7 @@ def unjoin_sentences(original_sentence: str, modified_sentence: str, separator:

# split by separator, remove double spaces and empty or only space strings from list
modified_lines = modified_sentence.split(separator_unjoin)
modified_lines = [s.strip().replace(' ', ' ').lstrip(" ,.:;)")
modified_lines = [s.strip().replace(' ', ' ').lstrip(" ,.:;)") if s.strip().replace(' ', ' ').lstrip(" ,.:;)") else s
for s in modified_lines if s.strip()]
modified_lines = [s for s in modified_lines if s]
modified_lines = [s for s in modified_lines if s.strip()]
Expand Down

0 comments on commit dbc125c

Please sign in to comment.