NLP Translation

부분 유료
분류별 gofitech | 업데이트됨 il y a 8 jours | Translation
인기

9.9 / 10

지연 시간

3,328ms

서비스 수준

99%

Health Check

N/A

모든 토론으로 돌아가기

There is a problem with the number of Chinese characters

Rapid account: Flytian
flytian
il y a 3 ans

My English is not good, sorry

There is a problem with the number of Chinese characters

php version of api interface

UTF-8 string “我是中国人”

rawurlencode(“我是中国人”) = %E6%88%91%E6%98%AF%E4%B8%AD%E5%9B%BD%E4%BA%BA

strlen(‘我是中国人’) = 15 characters in length
strlen(’%E6%88%91%E6%98%AF%E4%B8%AD%E5%9B%BD%E4%BA%BA’) = 45 characters in length

Originally, the Chinese characters I submitted were less than 5000 characters in length
The character length after rawurlencode exceeds 5000

Cause the api interface to return an error with characters exceeding 5000

array(2) {
[“status”]=>
int(412)
[“Error”]=>
string(77) “Text with More than 5000 characters or less than one Character is not allowed”
}

Rapid account: Gofitech
gofitech Commented il y a 3 ans

Hi,

Have you tried using the POST method?

The calculation of the length of the text should be done after the text is decoded.
I’ve tried to translate the text in the example above with GET method and I get the length of the text is 5 in the response.

{ "status": 200, "from": "auto", "to": "en", "original_text": "我是中国人", "translated_text": { "en": "I am Chinese" }, "translated_characters": 5 }

To make the investigation easier, could you send us the full text you want to translate that produces the error?

Thanks

아래에 의견을 추가하고 토론에 참여하세요.

새 댓글을 게시하려면 로그인 / 가입