Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

this api return very different result comparing to the translator website #307

Closed
2 of 6 tasks
braindevices opened this issue Aug 5, 2021 · 3 comments
Closed
2 of 6 tasks
Labels

Comments

@braindevices
Copy link

Googletrans version:

  • 4.0.0rc1
  • 3.1.0a0
  • 3.0.0
  • 2.x

I'm submitting a ...

  • bug report
  • feature request

the following text yield very different results:

*Department of Otolaryngology, Head and Neck Surgery, PLA General Hospital, Beijing†Department of Otolaryngology, Fujian Medical University ShengLi Clinical College, Fujian Provincial Hospital, Fuzhou‡Department of Otorhinolaryngology, Shenzhen Children's Hospital, Shenzhen§Department of Otolaryngology, Hainan Branch of PLA General Hospital, Sanya||Department of Otolaryngology, PLA Rocket Force General Hospital¶Department of Otolaryngology, The First Affiliated Hospital of the PLA General Hospital#Department of Otolaryngology, Beijing Friendship Hospital, Capital Medical University, Beijing**Medical School of Nankai University, Tianjin††Institute of Geriatrics, PLA General Hospital, Beijing, People's Republic of China

In https://translate.google.com it returns:

*北京解放军总医院耳鼻咽喉头颈外科†福建医科大学胜利临床学院耳鼻喉科,福建省立医院,福州‡深圳市儿童医院耳鼻喉科§耳鼻喉科海南分院 三亚解放军总医院||解放军火箭军总医院耳鼻喉科¶解放军总医院第一附属医院耳鼻喉科#北京首都医科大学附属北京友谊医院耳鼻喉科**北京南开医学院 天津大学††中国人民解放军总医院老年病研究所,北京,中华人民共和国 

Current behavior:

However, the following code return complete different result:

translator = googletrans.Translator()
src = r"*Department of Otolaryngology, Head and Neck Surgery, PLA General Hospital, Beijing†Department of Otolaryngology, Fujian Medical University ShengLi Clinical College, Fujian Provincial Hospital, Fuzhou‡Department of Otorhinolaryngology, Shenzhen Children's Hospital, Shenzhen§Department of Otolaryngology, Hainan Branch of PLA General Hospital, Sanya||Department of Otolaryngology, PLA Rocket Force General Hospital¶Department of Otolaryngology, The First Affiliated Hospital of the PLA General Hospital#Department of Otolaryngology, Beijing Friendship Hospital, Capital Medical University, Beijing**Medical School of Nankai University, Tianjin††Institute of Geriatrics, PLA General Hospital, Beijing, People's Republic of China"
trans = translator.translate(src, dest='zh-CN')
print(trans.text)
>>> *耳鼻喉科医院耳鼻喉科,北京市综肠科综肠科急性医学院,福建医科大学陈跃临床学院,福建省省级医院,福州县耳鼻咽喉科,深圳儿童医院,深圳综肠耳鼻喉科,海南分公司广场综合医院,三亚||耳鼻喉部耳鼻喉科省耳鼻喉科医院综肠耳鼻喉科,PLA总医院的第一位附属医院#耳鼻喉科学院,北京友谊医院,首都医科大学,北京**南开学院大学,天津市北京市人民共和国北京市综合医院老年化学研究所

Expected behavior:

should return the same string as the website
Steps to reproduce:

Related code:

insert short code snippets here

Other information:

@NawtJ0sh
Copy link

NawtJ0sh commented Aug 6, 2021

Try this #268 and see if it does the same thing, idk why it does that like sometimes it returns something different than the actual site also.

@braindevices
Copy link
Author

@NawtJ0sh thanks a lot! Your endpoint yield correct result. I wonder maybe the api need some extra parameters to get correct translation right now.

@stale
Copy link

stale bot commented Oct 5, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Oct 5, 2021
@stale stale bot closed this as completed Oct 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants