You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 23, 2024. It is now read-only.
Python version and virtual environment information: python --version
python 3.7
google-cloud- version: pip show google-<service> or pip freeze
google-cloud-translate==2.0.1
Steps to reproduce
Translate the two sentences written in Korean without spaces after the special symbols (.,! ...) using the google cloud translate API.
Code example
# examplefromgoogle.cloudimporttranslate_v2astranslatetranslate_client=translate.Client()
# case 1comments='야 너 왜 자꾸 문제 생겨.자꾸 이러면 못써'myTrans1=translate_client.translate(comments, target_language='en')
print('case 1 : ',myTrans1['translatedText'])
# case 2comments='야 너 왜 자꾸 문제 생겨. 자꾸 이러면 못써'myTrans2=translate_client.translate(comments, target_language='en')
print('case 2 : ', myTrans2['translatedText'])
Result
case 1 : Hey, why do you keep having problems?
case 2 : Hey, why do you keep having trouble? If I keep doing this, I can't use it
This is 100% reproducible. It needs credential key (GOOGLE_APPLICATION_CREDENTIALS) because I use paid service (Google Cloud Translate V2)
The difference in input data is just whether there is a space after the period or not. However, as a result of translation, in case 2, the second sentence disappeared without being translated.