-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to get random strings rather than all permutations #29
Comments
Hi, First of all, I just checked and indeed, there is a problem with the "number" parameter for the Now for your question, I am not entirely sure I understand what you're asking. If so, that is exactly what the "number" parameter of the If what you meant was that you want to allow duplicates in the generated output, that is not currently implemented as I don't see a use case for that at the moment. If that is the case, could you please tell me more about what you are trying to do, so that I can see if such a feature is worth adding to the program? :) All that being said, if what you care about is getting the output and you don't really need to have an interactive experience, you can just add your rule as part of an intent in your template file, give this intent a maximum number of examples to generate and run Chatette on it in normal more. In the case you show, you would add this line to your template file:
Of course, you can replace the I hope this helps. Feel free to ask questions if you need to! |
Thanks! I think the bug on the "number" parameter is really the underlying problem, because I just want, say, 5 examples, but with all my options, the possible combinations is much higher. So I suppose if I ask for only 5, I will get random ones... I just tried with the non-interactive and indeed, if I ask for less examples than the total permutation, I get something that's more random looking than just a sequential list of permutations. So I guess really what thew me off is due to not being able to put a number parameter, I ended up with seeing all permutation so I kind of assumed that if I asked for 3, I would get the top 3 of the total permutation instead of 3 random ones. |
Yes, if you ask for 5 examples, you will get 5 examples taken at random amongst the possible permutations. I will make the documentation clearer about this. I'll try to have this fixed soon. |
The problem with the |
This is a very useful tool, thanks for it!
Maybe I'm just doing something wrong, but when I read the Wiki, it seems like I should get "random" strings. But it really looks more like all permutations.
Let's say I have this configuration file:
I run the interactive mode and I issue this command:
The generated text output is a careful permutation of all possibilities, in sequence.
Also, your animated gif on the homepage of the project show a number after the
rule
command for the number of generation, but I get an error if I put a number. And your output is different... Probably the Gif was made from an older version prior to 1.6.1.Anyway, I was wondering if it is possible to get more random than permutation. For example, I would want just one pair of names and sometimes
and
and other times&
. But not all name pairs withand
and again all name pairs with&
.The text was updated successfully, but these errors were encountered: