TurqW / LongSphinx

Discord bot made to help with role management and RPG playing. Name inspired by the Terra Ignota series by Ada Palmer.
5 stars 3 forks source link

Constrained name generation #54

Open TurqW opened 5 years ago

TurqW commented 5 years ago

it would be cool to have a way to generate a name that starts with a certain letter or sequence of letters, though the case where it starts with a letter or sequence that doesn't exist in the source data will require some additional processing.

TurqW commented 5 years ago

Next step after this: "contains" requirement instead of just "starts with".

you might be able to do a "if the first letter of the to-be-contained string occurs, insert the rest of the string after it" combined with whatever "construct not in dataset" recovery protocol you use for -startswith, and then as long as that first letter exists in your dataset you can discard any invalid results without it getting too risky.

Obviously will require lots of testing.