1 00:00:00,360 --> 00:00:11,070 Here we would create frequency base of a star we would be is equal to create a list of your frequency, 2 00:00:11,070 --> 00:00:24,450 two letters dear God items and then you say frequency paresthesia, dot, you saw them giving is equal 3 00:00:24,450 --> 00:00:31,620 to Segert item at index zero function. 4 00:00:33,050 --> 00:00:41,090 OK, if you insist, and then we are saying the vote is equal to five. 5 00:00:41,270 --> 00:00:46,430 So once we have done this now or here, we have taken. 6 00:00:47,870 --> 00:00:51,160 OK, so this is the key and the value and then the fifth one. 7 00:00:51,170 --> 00:00:53,530 Now, we would not do that. 8 00:00:53,540 --> 00:00:59,240 The letter was already ordered by frequency and extracted all the letters for the final string after 9 00:00:59,240 --> 00:00:59,510 this. 10 00:00:59,870 --> 00:01:09,290 So over here we will see the frequency, although it still is equal to initially blank range, low frequency 11 00:01:09,980 --> 00:01:14,990 that is still in your frequency. 12 00:01:15,320 --> 00:01:28,040 That is still then you say frequency, although still not append the radio frequency bed. 13 00:01:28,340 --> 00:01:32,000 Still index one plus. 14 00:01:32,930 --> 00:01:41,840 Now, once you have done this, the last thing you supposed to return here to join in that frequency 15 00:01:42,290 --> 00:01:43,630 or the SDF. 16 00:01:44,360 --> 00:01:50,640 And once you have completed defining the frequency or the function, then we would go for defining the 17 00:01:51,620 --> 00:02:02,650 English frequency match score function, which dates again messages to parameter. 18 00:02:03,050 --> 00:02:10,670 And this function will return the number of matches that of the string in the message parameter has 19 00:02:11,000 --> 00:02:17,430 when its letter frequency is compared to the English that the frequency of match is how many of its 20 00:02:17,430 --> 00:02:25,430 six most frequent and least frequent letters are among the six most frequent and least frequently those 21 00:02:25,430 --> 00:02:26,270 for English. 22 00:02:26,450 --> 00:02:30,980 So for this, the first thing we will do is create your frequency. 23 00:02:32,320 --> 00:02:46,770 Although still not equal, we are saying get the frequency auto function and he'll pass messages to 24 00:02:46,810 --> 00:02:54,400 it after this will take the match score A, which is equal to zero initially. 25 00:02:54,880 --> 00:03:00,150 And we will find how many matches for the six most common letters there are. 26 00:03:00,430 --> 00:03:10,870 So for that, we would have to run a for loop saying the common letter is still in your e d a. 27 00:03:12,380 --> 00:03:25,220 I am six only, we are taking and we check here if the formal letter is still in your frequency order, 28 00:03:25,280 --> 00:03:25,820 still your. 29 00:03:29,090 --> 00:03:31,640 Then we say the match. 30 00:03:34,560 --> 00:03:43,500 Scholastica Plus is equal to one, and then we see fine, how many matches for the six least common 31 00:03:43,500 --> 00:03:44,320 leptospira. 32 00:03:44,370 --> 00:03:46,700 So here are the loop that we would run. 33 00:03:47,070 --> 00:03:48,960 We would take the uncommon. 34 00:03:50,070 --> 00:03:54,430 Later, a star in Eddie Lyon. 35 00:03:54,710 --> 00:04:07,770 And here we will use minus six, the least one, and then we will check if the uncommon letters in your 36 00:04:07,890 --> 00:04:20,910 frequency order are also matching minus six, then you made the match score a up again here plus is 37 00:04:20,910 --> 00:04:22,020 equal to one. 38 00:04:22,270 --> 00:04:31,500 OK, and finally, we are going to return the value of match score SDR from this particular function. 39 00:04:31,650 --> 00:04:40,260 So let us save this file and we would save it in c e drive. 40 00:04:43,520 --> 00:04:50,170 And let's give your same frequency analysis, dot fever. 41 00:04:50,930 --> 00:04:59,120 OK, so over here, if we just understand the particular more of or that we have written storing the 42 00:04:59,120 --> 00:05:05,730 letters in the area or an order that we have over here now, it creates a variable here, which is a 43 00:05:05,780 --> 00:05:12,810 way in which is storing literally six letters of the alphabet ordered from the most to the least frequent. 44 00:05:13,040 --> 00:05:18,590 Now, of course, not all mistakes reflect like this exact frequency ordering. 45 00:05:18,590 --> 00:05:24,800 You could easily find some set of letters frequencies where it is used more often than you. 46 00:05:24,830 --> 00:05:31,520 For example, some particular letters then also write where we use or we never use the letter E, we 47 00:05:31,520 --> 00:05:37,310 have WRI, which gives it an order or set of the letter frequencies. 48 00:05:37,310 --> 00:05:43,880 But in most cases, including in our particular session, the old order should be accurate enough. 49 00:05:44,000 --> 00:05:50,330 So the module also needs a string of all the uppercase letters in the alphabetical order for a few different 50 00:05:50,330 --> 00:05:55,600 functions since we are having the letter E are constant variable. 51 00:05:56,390 --> 00:06:03,020 So this solves the same problem as the symbols variable did in our previous examples, providing a mapping 52 00:06:03,020 --> 00:06:06,620 between the string letters and the integer indexes now. 53 00:06:06,650 --> 00:06:13,550 Next, we will look at how the letter counters function counts, the frequency of each letter stored 54 00:06:13,550 --> 00:06:14,790 in the message string. 55 00:06:15,260 --> 00:06:20,600 So we will see that particular function in the next session and understand what could have been given 56 00:06:20,600 --> 00:06:21,040 in that. 57 00:06:21,380 --> 00:06:22,740 That's it from the session. 58 00:06:22,760 --> 00:06:23,750 Thank you very much.