wordlistgen is a tool to pass a list of URLs and get back a list of relevant words for your wordlists. Wordlists are much more effective when you consider the application's context. wordlistgen pulls out URL components, such as subdomain names, paths, query strings, etc., and spits them back to stdout so you can easily add them to your wordlists
Source code and additional information may be found here: https://github.com/ameenmaali/wordlistgen