没想到,出现频率最高的竟然是 if,只打印出前 100 的结果,结果如下:
| 排名 | 单词 | 出现频率 |
| ------------- |:-------------:| --------:|
| 1 | if | 6489514 |
| 2 | the | 6468189 |
| 3 | int | 4967434 |
| 4 | struct | 4054639 |
| 5 | return | 3914619 |
| 6 | to | 3364146 |
| 7 | static | 3005835 |
| 8 | for | 2602651 |
| 9 | dev | 2457599 |
| 10 | of | 2245801 |
| 11 | is | 2192005 |
| 12 | in | 2140304 |
| 13 | data | 2109912 |
| 14 | void | 1884322 |
| 15 | public | 1875271 |
| 16 | null | 1687792 |
| 17 | this | 1629959 |
| 18 | size | 1602545 |
| 19 | type | 1490284 |
| 20 | code | 1441735 |
| 21 | char | 1370901 |
| 22 | name | 1347710 |
| 23 | device | 1329365 |
| 24 | and | 1278425 |
| 25 | case | 1277509 |
| 26 | info | 1273361 |
| 27 | set | 1222857 |
| 28 | get | 1217276 |
| 29 | err | 1197467 |
| 30 | include | 1157165 |
| 31 | else | 1149694 |
| 32 | final | 1109615 |
| 33 | be | 1092061 |
| 34 | const | 1091526 |
| 35 | or | 1075364 |
| 36 | ret | 1064328 |
| 37 | id | 1053822 |
| 38 | unsigned | 1042561 |
| 39 | reg | 1031811 |
| 40 | new | 984588 |
| 41 | break | 938215 |
| 42 | status | 928079 |
| 43 | state | 925750 |
| 44 | value | 924048 |
| 45 | error | 881768 |
| 46 | on | 873996 |
| 47 | len | 861584 |
| 48 | not | 858695 |
| 49 | define | 856804 |
| 50 | buf | 843766 |
| 51 | lock | 838826 |
| 52 | out | 812843 |
| 53 | list | 808374 |
| 54 | android | 803412 |
| 55 | mode | 784920 |
| 56 | string | 782238 |
| 57 | flags | 780342 |
| 58 | init | 760773 |
| 59 | write | 752943 |
| 60 | addr | 736167 |
| 61 | read | 731406 |
| 62 | license | 714767 |
| 63 | port | 703178 |
| 64 | buffer | 697968 |
| 65 | irq | 687626 |
| 66 | it | 682466 |
| 67 | max | 680456 |
| 68 | cmd | 673339 |
| 69 | file | 671579 |
| 70 | long | 667159 |
| 71 | limit | 664887 |
| 72 | that | 653529 |
| 73 | we | 627837 |
| 74 | td | 626595 |
| 75 | mask | 590776 |
| 76 | count | 590775 |
| 77 | linux | 584192 |
| 78 | with | 583013 |
| 79 | free | 582117 |
| 80 | offset | 581125 |
| 81 | debug | 577145 |
| 82 | priv | 570686 |
| 83 | sizeof | 570191 |
| 84 | goto | 569052 |
| 85 | config | 568890 |
| 86 | private | 568670 |
| 87 | start | 563578 |
| 88 | attr | 560578 |
| 89 | test | 559815 |
| 90 | base | 547793 |
| 91 | tx | 536071 |
| 92 | key | 522166 |
| 93 | as | 518649 |
| 94 | index | 515148 |
| 95 | ull | 514935 |
| 96 | by | 511802 |
| 97 | dma | 509802 |
| 98 | rc | 507164 |
| 99 | false | 506355 |
| 100 | pci | 502896 |
源码:
https://github.com/luoyesiqiu/StatisticWords
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
https://www.v2ex.com/t/470535
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.