Skip to main content
Archived

A function that removes diacritics (accents) from strings

Related products:Transformers
  • April 5, 2017
  • 3 replies
  • 161 views

moberdries
Contributor
Forum|alt.badge.img+7

If I have a user that needs to interactively do a Road-Name search then road names containing diacritics will fail the search. The workaround is to have 2 road name attributes, one for searching, and one for publishing. For my Road-Name search attribute, I need to be able to strip out the diacritics.

PostgreSQL offers a "unaccent" function to do this - can we have this same capability inside FME StringReplacer or similar?

Refer https://www.postgresql.org/docs/9.1/static/unaccent.html

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

3 replies

david_r
Celebrity
  • April 5, 2017

Maybe the StringDiacriticRemover from the FME Hub can help?

https://hub.safe.com/transformers/stringdiacriticremover


bruceharold
Influencer
Forum|alt.badge.img+19
  • Influencer
  • April 6, 2017

Mike, these are Maori macronated vowels in your context aren't they?

You could build something from the attached code or build a streetname locator from the style file in this sample:

 

maori-macrons.py

david_r
Celebrity
  • April 7, 2017
For info: I just tried a couple of these macronated vowels with the StringDiacriticRemover and it seems to work:

 

Input: Th? qu?ck brown fox j?mps over the l?zy d?g Output: The quick brown fox jumps over the lazy dog