V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
爱意满满的作品展示区。
jstony
V2EX  ›  分享创造

包装了一个 Python 版 bing 翻译器,开源。

  •  
  •   jstony · 2023-07-21 14:32:13 +08:00 · 1025 次点击
    这是一个创建于 430 天前的主题,其中的信息可能已经有所发展或是发生改变。

    后台调用的是 bing.com 提供的免费翻译器,支持中国区和国际区,不会插视频,效果见 B 站吧,自测速度还是不错的。

    https://www.bilibili.com/video/BV1L8411m7K8

    提醒一下,省着点用,不要把主人撸急了。

    开源版,地址:

    github

    gitee

    6 条回复    2023-12-29 16:01:01 +08:00
    wangqianqian
        1
    wangqianqian  
       2023-07-21 16:39:28 +08:00
    好像 telegram 的机器人也可以做到类似的效果
    jstony
        2
    jstony  
    OP
       2023-07-21 16:46:33 +08:00
    @wangqianqian 不翻的情况下,cn.bing 还是挺好用的。
    ohayoo
        3
    ohayoo  
       2023-08-22 09:28:11 +08:00
    from cn_bing_translator import Translator

    if __name__ == "__main__":
    translator = Translator(fromLang='en', toLang='zh')
    source = "China Zhejiang Jinhua China Mobile Communications Corporation"
    result = translator.process(source)
    print(result)

    貌似不能英文翻中文
    jstony
        4
    jstony  
    OP
       2023-08-22 10:34:06 +08:00
    @ohayoo 中文请选 zh-Hans
    ohayoo
        5
    ohayoo  
       2023-08-22 11:45:20 +08:00
    @jstony #4 多谢 OP
    ohayoo
        6
    ohayoo  
       269 天前
    用了几个月,现在挂了,不过还是谢谢 op
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   3178 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 11:28 · PVG 19:28 · LAX 04:28 · JFK 07:28
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.