This website works better with JavaScript.
Home
Explore
Help
Register
Sign In
khangtran
/
dark_web_forums
Watch
0
Star
0
Fork
0
Code
Issues
0
Pull Requests
0
Projects
0
Releases
0
Wiki
Activity
Browse Source
skip translate when source equals target
main
Ericsson Santana Marin
9 months ago
parent
79cb0990d1
commit
17d5e9f9b2
1 changed files
with
3 additions
and
0 deletions
Unified View
Diff Options
Show Stats
Download Patch File
Download Diff File
+3
-0
Translator/translate.py
+ 3
- 0
Translator/translate.py
View File
@ -8,6 +8,9 @@ def translate(input_text: str, source: str, target='english') -> str:
if
len
(
input_text
.
strip
(
)
)
==
0
:
if
len
(
input_text
.
strip
(
)
)
==
0
:
return
input_text
return
input_text
if
source
==
target
:
return
input_text
batch_size
=
4999
batch_size
=
4999
batches
=
[
]
batches
=
[
]
whitespaces
=
[
]
whitespaces
=
[
]
Write
Preview
Loading…
Cancel
Save