Question

FME Challenge: Transformer Naming Part II



Show first post

57 replies

Badge +22
I was thinking about all the different numbers that people have found and decided to review my own Workspace. I found an error that create duplicate values for the same transformer and filtered those out, since it got a count of 2. Solved the problem and I got 734 unique results and 316 transformers that can be called through a unique three letter code.

 

 

As everyone is sharing the Workspaces, I also added my last version.

 

fme-find3letter-options-v002.fmw

 

I'd argue that you are using regex in your analysis, since the StringReplacer is in mode Replace Regular Expression.
Badge +22
I too now get 734 unique codes - but only 122 transformers. What am I doing!? Why did I make this challenge?!

 

Well unless you share, we can't help. ;)

 

 

Userlevel 2
Badge +17
I too now get 734 unique codes - but only 122 transformers. What am I doing!? Why did I make this challenge?!

 

I analyzed with some ways. "734 unique codes for 316 transformers" seems to be the correct answer. However the number could become slightly different a little depending on the rules about Camel-Case entries.

 

Badge +22

616 unique combinations to find 290 unique transformers

Both the MinimumSpanningCircleReplacer and the AutodeskA360Connector have 9 unique 3 letter combinations

spoiler.jpg

Edit: I missed the CamelCase comment but looks like I was in good company :-)

Including CamelCase

That's a clever way to get your 3 character strings.

 

Userlevel 4
Badge +25
@Mark2AtSafe, I thought camel-case three-letter should consist of consecutive capital characters or digits after removing every lower case character. It seems to fit to the behavior of the Quick Add in most cases, but it doesn't explain why A0C is also good.

 

 

Good point. I shall check with our developers. It looks like A0C should not work. Perhaps there is a new rule we don't know about!

 

 

Badge +22

Looks like a surprising number of transformers can be uniquely identifed by 2 characters - 58

There's at least one that can be uniquely identified by 1 character...
Userlevel 4
Badge +25
I'd argue that you are using regex in your analysis, since the StringReplacer is in mode Replace Regular Expression.
I am too - but as long as it's not too extensive (ie it's not doing most of the problem in one step) then I think it's OK.

 

Badge +22
I am too - but as long as it's not too extensive (ie it's not doing most of the problem in one step) then I think it's OK.

 

It's certainly OK, and a good expression. I'm just refering to the statement:

 

"The analysis was done with all unique transformers, except for one, and no ReGex is being used in the analysis."

 

 

Userlevel 1
Badge +21

I decided to attempt this with no explicit regex expressions.

I also determined 316 unique transformers and 734 codes.

Interestingly enough I got 10 unique combinations for the AutodeskA360Connector (all those that @egomm posted plus AA3.

uniquetransformername.fmwt

 

Yeah, the original 9 I mention was before I added in the CamelCase options
Userlevel 4
Badge +25
Well unless you share, we can't help. ;)

 

 

Lol (as the kids these days say). I have it now. 122 transformers with one (and only one) unique code, and 194 transformers with multiple unique codes (I was dropping them) makes 316. I must say, when I thought it might mess up people's work days, I didn't think it would include mine!

 

Badge +2

Edit - new answer https://knowledge.safe.com/answers/47549/view.html

Userlevel 4
Badge +25

Hmmm. I get 7337 three-letter codes, 974 unique codes, and only 123 transformers. I wonder why I have more unique codes than anyone, but way fewer transformers?! I thought I had a really good solution, but shall have to check my workspace. Something seems wrong.

OK, here's the workspace (fmw file attached here):

 

 

Userlevel 4
Badge +25
There's at least one that can be uniquely identified by 1 character...
I thought you were wrong... but you're right. There is one transformer that can be uniquely identified by a single character only! Who knew?

 

 

Userlevel 1
Badge +21
I thought you were wrong... but you're right. There is one transformer that can be uniquely identified by a single character only! Who knew?

 

 

Actually can be identified by two different single characters

 

 

Badge +22

Looks like a surprising number of transformers can be uniquely identifed by 2 characters - 58

hmm, I'm only getting 57 transformers with 2 character uniqueness.

 

 

Nevermind, that's 57 that require a minimum of 2 characters to be unique, it's not counting the the transformer that only requires 1.
Badge +22

Given any code length, there are 31,427 unique combinations, however those can only determine 451 transformers. There are 28 transformer that just plain are not unique.

This my minimum uniqueness breakdown chart.

Code LengthNumber of Transformers1125732584865346573819None10311112None132Not Unique28

The total results are transformercodes.csv

And the workspace is mimimumtransformercodes.fmw

 

I just want to go on record as saying subsetting a list without python is not pretty.
Userlevel 1
Badge +21
hmm, I'm only getting 57 transformers with 2 character uniqueness.

 

 

Nevermind, that's 57 that require a minimum of 2 characters to be unique, it's not counting the the transformer that only requires 1.
57 for 2 letters, 58 if you allow numbers to count as well

 

 

Badge +2
Removed
Userlevel 1
Badge +21

Have improved on mine slightly, can now choose the length and whether to allow numbers to be counted as characters (715 letter combinations across 310 transformers if excluding numbers)

tripletfinder.fmw

Userlevel 4
Badge +25

This is great work from everyone. I wish I'd thought of this for the FMEUC hackathon!

Here's some extended info that I created. The string length with the most transformers is 6 characters. There are 433 transformers that can be identified by a six-character string.

Since the shortest transformer (that I can think of) is the six-character Sorter, it means there is no set of fixed-length unique characters that can identify all transformers.

After six-characters the count begins to decline... but not as quickly as you'd expect. For example, there are still 285 transformers that can be identified by a 15-character string!

I made a quick and dirty graph of it:

At 36 characters there is only one transformer. That would be the "CoordinateSystemDescriptionConverter". Unsurprisingly at that point its unique string is the full transformer name!

If anyone hasn't tried the challenge yet, please don't be put off by all the other answers! I'd be interested to see the different ways you achieve a solution (and you'll still earn some extensive reputation points).

Badge +22

This is great work from everyone. I wish I'd thought of this for the FMEUC hackathon!

Here's some extended info that I created. The string length with the most transformers is 6 characters. There are 433 transformers that can be identified by a six-character string.

Since the shortest transformer (that I can think of) is the six-character Sorter, it means there is no set of fixed-length unique characters that can identify all transformers.

After six-characters the count begins to decline... but not as quickly as you'd expect. For example, there are still 285 transformers that can be identified by a 15-character string!

I made a quick and dirty graph of it:

At 36 characters there is only one transformer. That would be the "CoordinateSystemDescriptionConverter". Unsurprisingly at that point its unique string is the full transformer name!

If anyone hasn't tried the challenge yet, please don't be put off by all the other answers! I'd be interested to see the different ways you achieve a solution (and you'll still earn some extensive reputation points).

There is no set (fixed length or otherwise) that can uniquely identify all the transformers, as we have dozens that are entirely within another transformer.

 

 

Snapper ->AnchoredSnapper

 

Generalizer-> SherbendGeneralizer

 

Affiner -> 3DAffiner (Why aren't these consolidated btw?)

 

Aggregator ->Deaggregator

 

Counter -> 6 other transformers

 

Creator -> 10 other transformers

 

etc.

 

Badge +2

So a late Saturday evening revision because I just couldn't let it go! I re-read some of the comments and realised I wasn't accounting for numeric values in the unique values. But I had read the following:

 

 

"The challenge is to scan that list and generate as many unique three-letter codes as you can."

 

 

Letters not number otherwise it might have said characters ;)

So my revised new total is 735 unique values containing a mix of numbers and letters, for 316 Transformers @Mark2AtSafe

Badge +2

 

Clearly my approach was flawed from outset. Need to see how it should be done!
Badge +22

This is great work from everyone. I wish I'd thought of this for the FMEUC hackathon!

Here's some extended info that I created. The string length with the most transformers is 6 characters. There are 433 transformers that can be identified by a six-character string.

Since the shortest transformer (that I can think of) is the six-character Sorter, it means there is no set of fixed-length unique characters that can identify all transformers.

After six-characters the count begins to decline... but not as quickly as you'd expect. For example, there are still 285 transformers that can be identified by a 15-character string!

I made a quick and dirty graph of it:

At 36 characters there is only one transformer. That would be the "CoordinateSystemDescriptionConverter". Unsurprisingly at that point its unique string is the full transformer name!

If anyone hasn't tried the challenge yet, please don't be put off by all the other answers! I'd be interested to see the different ways you achieve a solution (and you'll still earn some extensive reputation points).

I think the Tiler is the shortest transformer at 5.
Badge +1

Ok, first try at one of these challenges.

I get 424 unique three letter codes for all 479 unique transformers in the list using sequential three letter sequences from the transformer names.

Been toying around some more. 361 transformers uniquely identified by a three charactercode (three sequential characters from the transformer name) with a total of 966 unique codes

 

9235-challenge3lettercodesv2.fmw

 

 

Reply