ghostgril
V2EX  ›  问与答

按照拼音首字母给城市分组排序的时候如何处理多音字呢

  •  
  •   ghostgril · Jun 12, 2018 · 2082 views
    This topic created in 2920 days ago, the information mentioned may be changed or developed.

    通过对照字典我给城市分组排序的时候发现,类似重庆这种城市首个汉字是多音字那么就会被分配错误。

    多音字处理该如何是好呢

    bmxbmx3
        1
    bmxbmx3  
       Mar 7, 2021
    pypi 的 cn_sort 库能处理这个问题
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5842 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 48ms · UTC 02:56 · PVG 10:56 · LAX 19:56 · JFK 22:56
    ♥ Do have faith in what you're doing.