community
cancel
Showing results for 
Search instead for 
Did you mean: 
Do you have the skills to make it to the top? Subscribe to our weekly challenges. Try your best to solve the problem, share your solution, and see how others tackled the same problem. We share our answer too.
Weekly Challenge
Do you have the skills to make it to the top? Subscribe to our weekly challenges. Try your best to solve the problem, share your solution, and see how others tackled the same problem. We share our answer too.
Unable to display your progress at this time. Please try again a little later, or contact an administrator if you continue to see this error.
Getting started with Designer? | Start your journey with our new Learning Path!

Challenge #59: Is it an Anagram?

Alteryx Certified Partner

Hi everyone,

 

I decided to share my solution as well.

 

Since I am learning Alteryx for one week only and didn't know about the Tokenize tool, I used a rather lengthy approach.

 

Spoiler
Screen Shot 2017-02-27 at 22.56.03.png

 

Magnetar
Magnetar

Here's my solution. Definitely borrowed the minimum of Yes/No in the Summarize tool from @MarqueeCrew... thanks!!

Spoiler
WeeklyChallenge59.JPG

 

Bolide

Kudos, @AdamR.  However, I must say this won't work for compound words or words that contain accents/special characters ;-)

Bolide

A similar, yet very slightly different approach...

 

Spoiler
WC59.JPG

 

 Taylor Cox

 

Asteroid
Spoiler
Capture2.PNGCapture.PNG

I used an iterative macro to create every anagram of word1. Not a very efficient approach. But different!

 

Meteoroid

This is definitely too convoluted, but here is my solution.

I hadn't used tokenize before, so this was a nice opportunity.  I would appreciate some critical feedback, I am working mostly in a bubble, so I am happy for input.

Alteryx Certified Partner
Alteryx Certified Partner

@MichaelWalsh,

 

You can look at my solution for clarification of my comments.  It isn't that mine is right (because we get to the same solution), but since you asked I will give you critical feedback.

 

  • No documentation or annotation
  • If you transpose the data before your tokenize it, you will have a more simplified workflow.  The tokenize function is identical for word1 and word 2, so think in terms of how you can avoid the duplicate tokenize & summarize and then the need to join the data back together again (twice).  I don't know about that unique tool, but all of that could be simplified.

When you see a post by @AdamR, read it.

 

I went down the same path with counting each letter.  Later, I realized the rules of the anagram didn't care about counts.  What really mattered was that the alphabetized order of all letters between the two words had to be an exact match:  LISTEN & SILENT both become:  EILNST

 

If you solve each word to become the component letters like that, if they match then they are anagrams.

 

We both could improve our workflows with that in mind.

 

Cheers,
Mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and reboot. Order shall return.
Meteoroid

Hi there,

Please find my script enclosed.

At first i was aiming to use the fuzzy match with the key generation on Whole Field and matching on levenshtein distance but somehow (and i was like a day on it without understanding why to day) it only compared and output a match on the first word, everything else was a match between the same word ( meaning Record 1 with Record 1)... I've tried the Purge and Merde mode (with different IDs on word 1 and 2 to make it looks like it's coming from two diferent sources), I've tried different key generation (Double metaphone) and matching (Jaro distance), it's driving me nuts.

I can post this script that failed but if someone has an explaination that will ease my sleep.

Cheers

Alteryx Certified Partner

Doing a little catch up and completed this. It feels like I have used way more tools than needed but it got the result.

 

Spoiler
Week 59 Solution.jpg