-
Cloud Translation API : source 를 HTML이 아닌 Text로 인식시키기 (' 가 ' 로 번역될때)클라우드/GCP 2023. 2. 10. 16:20
비슷한 고민이 Stack overflow에
Translation by Google Cloud Translate API returns html escaped text
In my application, I am trying to translate a few Spanish texts to English using the Google Cloud Translation API. I noticed that the texts that I am receiving after translation is HTML escaped, me...
stackoverflow.com
저 Client()타고 client.py로 들어가서
data의 foramt을 text로 변경해줬다.
format_으로 되어있을 경우 html은 html로 넘어가고
text로 변경해줘야 plain text로 넘어간다고해서
def translate( self, values, target_language=None, format_='text', source_language=None, customization_ids=(), model=None, ):
중요한건 text가 아닌 'text'여야함.
https://cloud.google.com/translate/docs/reference/rest/v2/translate#query-parameters
Method: translate | Cloud Translation | Google Cloud
Send feedback Method: translate Stay organized with collections Save and categorize content based on your preferences. Translates input text, returning translated text. HTTP request POST https://translation.googleapis.com/language/translate/v2The URL uses
cloud.google.com
반응형'클라우드 > GCP' 카테고리의 다른 글
firebase api서비스 사용하기 - 서비스키 발급 + Google API 사용 (0) 2023.02.27 Firebase 로그인 unauthorized-domain에러 (0) 2023.02.13 윈도우 로컬환경에서 Google Cloud Platform API 사용하기 전 Credentials 인증정보 세팅 (0) 2023.02.10 Download Gcloud SDK and Configure the gcloud environment (0) 2023.02.02 [gcp]firewall update 명령어 (0) 2023.01.30