Here we would create frequency base of a star we would be is equal to create a list of your frequency,
two letters dear God items and then you say frequency paresthesia, dot, you saw them giving is equal
to Segert item at index zero function.
OK, if you insist, and then we are saying the vote is equal to five.
So once we have done this now or here, we have taken.
OK, so this is the key and the value and then the fifth one.
Now, we would not do that.
The letter was already ordered by frequency and extracted all the letters for the final string after
this.
So over here we will see the frequency, although it still is equal to initially blank range, low frequency
that is still in your frequency.
That is still then you say frequency, although still not append the radio frequency bed.
Still index one plus.
Now, once you have done this, the last thing you supposed to return here to join in that frequency
or the SDF.
And once you have completed defining the frequency or the function, then we would go for defining the
English frequency match score function, which dates again messages to parameter.
And this function will return the number of matches that of the string in the message parameter has
when its letter frequency is compared to the English that the frequency of match is how many of its
six most frequent and least frequent letters are among the six most frequent and least frequently those
for English.
So for this, the first thing we will do is create your frequency.
Although still not equal, we are saying get the frequency auto function and he'll pass messages to
it after this will take the match score A, which is equal to zero initially.
And we will find how many matches for the six most common letters there are.
So for that, we would have to run a for loop saying the common letter is still in your e d a.
I am six only, we are taking and we check here if the formal letter is still in your frequency order,
still your.
Then we say the match.
Scholastica Plus is equal to one, and then we see fine, how many matches for the six least common
leptospira.
So here are the loop that we would run.
We would take the uncommon.
Later, a star in Eddie Lyon.
And here we will use minus six, the least one, and then we will check if the uncommon letters in your
frequency order are also matching minus six, then you made the match score a up again here plus is
equal to one.
OK, and finally, we are going to return the value of match score SDR from this particular function.
So let us save this file and we would save it in c e drive.
And let's give your same frequency analysis, dot fever.
OK, so over here, if we just understand the particular more of or that we have written storing the
letters in the area or an order that we have over here now, it creates a variable here, which is a
way in which is storing literally six letters of the alphabet ordered from the most to the least frequent.
Now, of course, not all mistakes reflect like this exact frequency ordering.
You could easily find some set of letters frequencies where it is used more often than you.
For example, some particular letters then also write where we use or we never use the letter E, we
have WRI, which gives it an order or set of the letter frequencies.
But in most cases, including in our particular session, the old order should be accurate enough.
So the module also needs a string of all the uppercase letters in the alphabetical order for a few different
functions since we are having the letter E are constant variable.
So this solves the same problem as the symbols variable did in our previous examples, providing a mapping
between the string letters and the integer indexes now.
Next, we will look at how the letter counters function counts, the frequency of each letter stored
in the message string.
So we will see that particular function in the next session and understand what could have been given
in that.
That's it from the session.
Thank you very much.