我正在尝试使用 Python3 中的 unidecode 库来删除俄语单词(西里尔字母)中的重音符号。unidecode 库适用于其他示例,但不适用于俄语单词。任何帮助将不胜感激。
不是去掉“e”字母上的重音,而是俄语单词变成“ND3/4D3/4D+-NDuID1/2D,N”,这不是我们想要的……
Python 3.3.0 (default, Oct 24 2012, 14:30:03)
[GCC 4.4.6 20110731 (Red Hat 4.4.6-3)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> # -*- coding: utf-8 -*-
...
>>> from unidecode import unidecode
>>> print(unidecode(u"Cœur"))
CAur
>>> print(unidecode(u"сообще́ния"))
ND3/4D3/4D+-NDuID1/2D,N
>>>