name-machine
name-machine copied to clipboard
Allow setting generation options on each pass
The http://namemachine.xyz API allows the specification of gender probability. Because of this, a new instance of NameGenerator has to be instantiated for each request, which means parsing the names files every since time.
This would be much more efficient if options could be specified each time. We could then keep one generator in application state.
To keep the API consistent and compatible, the current method of specifying options should set the default options that are used if options aren't specified for a particular invocation.