Comments (3)
Interesting. This looks like something coming from the backend. I tried the v2 REST API directly, the v3 client, and translate.google.com
REST API:
https://translation.googleapis.com/language/translate/v2/?q=%EC%95%BC%20%EB%84%88%20%EC%99%9C%20%EC%9E%90%EA%BE%B8%20%EB%AC%B8%EC%A0%9C%20%EC%83%9D%EA%B2%A8.%EC%9E%90%EA%BE%B8%20%EC%9D%B4%EB%9F%AC%EB%A9%B4%20%EB%AA%BB%EC%8D%A8&source=ko&target=en&key=YOUR_API_KEY
v3 client
from google.cloud import translate
client = translate.TranslationServiceClient()
parent = client.location_path('PROJECT_ID', "global")
text_no_space = '야 너 왜 자꾸 문제 생겨.자꾸 이러면 못써'
text_with_space = '야 너 왜 자꾸 문제 생겨. 자꾸 이러면 못써'
for text in [text_no_space, text_with_space]:
response = client.translate_text(
parent=parent,
contents=[text],
mime_type="text/plain",
source_language_code="ko",
target_language_code="en",
)
# Display the translation for each input text provided
for translation in response.translations:
print(u"Translated text: {}".format(translation.translated_text))
From poking around with different inputs this doesn't seem to always happen.
'너 왜 자꾸 문제 생겨.이러면 못써
-> Why do you keep having problems?
너 왜 자꾸 문제 생겨.너 이러면 못써
-> Why do you keep having trouble, you can't use this
If feasible, you could insert spaces around the punctuation as a work-around.
@czahedi Where is the correct place to provide feedback on translation quality?
from python-translate.
Howdy! Just checked with the translation team and they have a public feedback / issue tracking forum here: https://issuetracker.google.com/issues?q=componentid:187144
from python-translate.
@InspiringPeople I encourage you to file an issue above and get your feedback directly to the product team, and refer to Bu Sun's workaround in the meantime. Thanks!
from python-translate.
Related Issues (20)
- Multiple translations for ambiguously gendered inputs HOT 2
- Weird text encoding returned in v2 translation HOT 5
- Google Cloud Translation - Glossaries - Failed to Initialize Glossary HOT 2
- Your .repo-metadata.json file has a problem 🤒
- tests.system.TestTranslate: test_detect_language failed HOT 2
- Translate APIのドキュメント翻訳機能をPythonを使って呼び出しをした際に、登録した辞書の内容が反映されない。 HOT 1
- use unittest.mock or mock consistently
- Warning: a recent release failed HOT 1
- translate_v3beta1_translate_document.py fails to save translation to a local file
- tests.system.TestTranslate: test_detect_language failed
- Configuration error for release-please
- tests.unit.v2.test__http.TestConnection: test_build_api_url_no_extra_query_params failed HOT 7
- tests.unit.v2.test__http.TestConnection: test_build_api_url_w_custom_endpoint failed HOT 2
- tests.unit.v2.test__http.TestConnection: test_build_api_url_w_extra_query_params failed HOT 4
- tests.unit.v2.test__http.TestConnection: test_build_api_url_w_extra_query_params_tuple failed HOT 3
- tests.unit.v2.test__http.TestConnection: test_extra_headers failed HOT 2
- tests.unit.v2.test_client.TestClient: many tests failed HOT 3
- tests.unit.v2.test__http.TestConnection: test_build_api_url_w_extra_query_params_tuple failed HOT 5
- tests.unit.v2.test__http.TestConnection: test_extra_headers failed HOT 5
- tests.unit.v2.test_client.TestClient: many tests failed HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python-translate.