Helly everyone,
I am working with data that consists of abrreviations/code items that are strung together in a single field which I am trying to convert to full text. For that I am using a string pair replacer which contains thousands of mapping pairs, but I have encountered a problem which I can’t seem to solve without knowing how exactly the String Pair replacer does its thing. The problem arises when multiple codes share letters.
Here`s an example: I have the following pairs somewhere in my replacement pair string
**gn green
**bn brown
g gravel
F mud
So F:**bn**gn should map to Mud:browngreen but whats happening is this: M:brown**gravelr.
I figured that the transformer probably checks its list from start to finish and ordered my list by string length in hopes it would transform longer strings first. The order of replacement items definetely has a big impact on the result and I was succesful of ironing out most errors in doing that but this particular translation and a few others still dont seems to be working correctly.
Does anyone have any insight on how the transformer works and how I can solve this issue? I am pretty certain that this can be solved by ordering the replacement pairs in a certain way.
Best regards