instagenerate
instagenerate copied to clipboard
Drive instagenerate in a probabilistic way
Hi Alex,
I was wonder if it is somehow possible to drive instagenerate in a probabilistic way.
Let me explain.
Let's suppose I got a grammar similar to:
A = B ('c3' | 'd4')
B = 'a1' | 'b2'
This will generate these 4 strings:
a1c3
b2c3
b2d4
a1d4
Now, for my goal, I know that is more likely that the string I am looking for start with a1
, so I want the generator to return first a1c3
and a1d4
and later b2c3
and b2d4
.
Is that possible ? How ?
Do you suggest some resource I can explore further ?
Thanks for your time and wonderful work :)