Create a list of synonym combinations

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
pramach
Posts: 54
Joined: 24 Jan 2018, 08:20

Create a list of synonym combinations

05 Oct 2018, 06:59

Hi there

Maybe someone could give me a tip in how to solve a problem.

Assuming I have following string: John,Paul,George,Ringo
Also assuming I have following synonyms
- John = Piano, Guitar
- Paul = Piano, Guitar, Vocals
- George = Guitar
- Ringo = Drums

As a result, I want to have now all possible combinations, means:
John,Paul,George,Ringo
Piano,Paul,George,Ringo
Guitar,Paul,George,Ringo
John,Piano,George,Ringo
John,Guitar,George,Ringo
John,Vocals,George,Ringo
Piano,Piano,George,Ringo
Piano,Guitar,George,Ringo
Piano,Vocals,George,Ringo
Guitar,Piano,George,Ringo
Guitar,Guitar,George,Ringo
Guitar,Vocals,George,Ringo
John,Paul,Guitar,Ringo
Piano,Paul,Guitar,Ringo
...

The number of entries in my string is between 1 and 5.
The number of variations of string entries (the names) is something around 20.
The number of synonyms for each is between 1 and 4

I'm aware that the number of combinations gets large ;-)

To be honest, I'm not searching for a complete code (not saying no ...) but more for ideas how to create such a list
Any ideas are welcome.

Btw, the sequence of the list does not matter as long as the sequence of each list entry(name1 - n) does not change.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Rohwedder and 346 guests