ghostgril
V2EX  ›  问与答

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

  •  
  •   ghostgril · Jun 12, 2018 · 2164 views
    This topic created in 2966 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   ·   1128 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 23:45 · PVG 07:45 · LAX 16:45 · JFK 19:45
    ♥ Do have faith in what you're doing.