Open justducky opened 4 years ago
Thank you, I will update the next version of the book to include your changes. It is going into the 4th printing now so this will probably occur sometime in 2021.
We are getting ready for the next printing and I noticed that your code is doubling the frequency count for digrams like "vo." It looks like you overwrite the digrams set with this line:
digrams = sorted([''.join(i) for i in permutations(name, 2)])
When you print out the list of digrams, you'll see that several are duplicated, which can't happen with a set data type. This is overall a good approach however, and I plan to include an edited version in the update.
Simplify digram generation and sort Sort digram frequency count