使用StringPairReplacer并将下面的字符串粘贴到替换对参数中。
创建一个自定义转换器,并在任何工作台中轻松使用它。我已经创建了像这样的埃森哲:D
不过只对法语有好处……
一千一百一十一万一千一百一十一c c c c e e e e e e e e e e e e e e e e我我我我我我我我o o o o你你你你你你你你你你你你
这里是Python 3.6更新的相同代码,@jeroenstiers
导入fmeobjects将unicodedata导入为ud def rmdiacritics(char): ''返回char的基本字符,通过'删除'任何diacritics,如重音符号或卷发和笔画等。“desc = ud.name (char)截止= desc.find(“与”)如果截止! = 1:desc = desc(截止):返回ud.lookup (desc) def removeAccents(特性):attribute_list =(“名称”、“类型”、“国家”)#根据需要修改的鲜明feature.getAllAttributeNames():如果在attribute_list鲜明:value = feature.getAttribute(鲜明)如果值:价值= str(值)new_value = " . join ([rmdiacritics (char)字符的值))功能。new_value setAttribute(鲜明)
我注意到,由于by提供的代码,我经常回到这个问题@david_r。
我认为可能有更多的人使用这个代码,所以我把它转换成一个自定义变压器:
https://hub.亚搏在线safe.com/transformers/stringcleaner
你好,
下面是一个使用PythonCaller的更动态的解决方案。修改“attribute_list”(第16行,区分大小写),以包含要检查重音符号的属性名称:
导入fmeobjects将unicodedata导入为ud def rmdiacritics(char): ''返回char的基本字符,通过'删除'任何diacritics,如重音符号或卷发和笔画等。“desc = ud.name (unicode (char))截止= desc.find(“与”)如果截止! = 1:desc = desc(截止):返回ud.lookup (desc) def removeAccents(特性):attribute_list =(“名称”、“类型”、“国家”)#根据需要修改的鲜明feature.getAllAttributeNames():如果在attribute_list鲜明:value = feature.getAttribute(鲜明)如果值:价值= unicode(值)new_value = " . join ([rmdiacritics (char)字符的值))功能。new_value setAttribute(鲜明)在PythonCaller之前的示例值: