Hello colleagues, okay?
I would like to know how to create a program in BATCH to generate Anagrams.
Or be a program where u enter any word and it will bring you the results "scrambled" and possibilities of that word.
This ends up involving mathematics (factor) where the word with 4 different letters manages just 24 combinations (4! = 4 * 3 * 2 * 1 = 24)
Example 3 letters which generates 6 combinations ....
mae
emu
eam
m
aem
love
Could you help me?
(sorry bad english --- google Tradutor --- Brazil )
Anagrams Generator
Moderator: DosItHelp
Re: Anagrams Generator
akimotoiv wrote:Example 3 letters which generates 6 combinations ....
mae
emu
eam
m
aem
love
Why is m there and not ae and em etc? How come love is there?
-
- Expert
- Posts: 1166
- Joined: 06 Sep 2013 21:28
- Location: Virginia, United States
Re: Anagrams Generator
Love is there as a side effect of running the entire post through Google Translate.
Ame is Portuguese for love, apparently.
Ame is Portuguese for love, apparently.
Re: Anagrams Generator
ShadowThief wrote:Love is there as a side effect of running the entire post through Google Translate.
Ame is Portuguese for love, apparently.
Thanks, that explains that well.
I'm still curious about m. Maybe that was a translation error too.
-
- Expert
- Posts: 1166
- Joined: 06 Sep 2013 21:28
- Location: Virginia, United States
Re: Anagrams Generator
foxidrive wrote:ShadowThief wrote:Love is there as a side effect of running the entire post through Google Translate.
Ame is Portuguese for love, apparently.
Thanks, that explains that well.
I'm still curious about m. Maybe that was a translation error too.
Google Translate says that's exactly what happened, though I can't fathom why. M in Portuguese (from what I can tell, anyway) is spelled eme.
Re: Anagrams Generator
ShadowThief wrote:Google Translate says that's exactly what happened, though I can't fathom why. M in Portuguese (from what I can tell, anyway) is spelled eme.
Brilliant sleuthing!
There's a thread here that might help the OP. viewtopic.php?f=3&t=4585
Re: Anagrams Generator
First, Thanks for the answer. And correcting the permutations would be.. Mae, mea, eam, ema,"ame"( verb to love in Portuguese, so the translation" love"), aem.... As for the link, helped much, but I am lost when appears" goto permutations" and" goto eof" could explain myself better? I'm newbie in batch.... I thank the attention outset.
Re: Anagrams Generator
In Aacini's batch file at viewtopic.php?p=26332#p26332 change this
and put the pause in like this
Then try the batch file and it will pause at the end.
That point in the batch file is the end of the code.
The batch file uses recursive calls to the same batch file to do the work.
Code: Select all
rem Show unique permutations and number of repetitions
for /F "tokens=2,3 delims=[]=" %%a in ('set p[') do (
echo %%b- %%a
)
goto :EOF
and put the pause in like this
Code: Select all
rem Show unique permutations and number of repetitions
for /F "tokens=2,3 delims=[]=" %%a in ('set p[') do (
echo %%b- %%a
)
pause
goto :EOF
Then try the batch file and it will pause at the end.
That point in the batch file is the end of the code.
The batch file uses recursive calls to the same batch file to do the work.