Skip to content

Conversation

@justducky
Copy link

Simplify digram generation and sort
Sort digram frequency count

Sort digram frequency count
@rlvaugh
Copy link
Owner

rlvaugh commented Sep 30, 2020

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.

@rlvaugh
Copy link
Owner

rlvaugh commented Jul 1, 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants