Added checks to ensure the input file contains enough unique words to generate
the specified phrases file