Data update
This commit is contained in:
parent
5150844a7d
commit
4bb20c9b71
7735 changed files with 38060 additions and 199180 deletions
|
|
@ -3,11 +3,9 @@ func entropy s$ .
|
|||
for c$ in strchars s$
|
||||
d[strcode c$] += 1
|
||||
.
|
||||
for cnt in d[]
|
||||
if cnt > 0
|
||||
prop = cnt / len s$
|
||||
entr -= (prop * log10 prop / log10 2)
|
||||
.
|
||||
for cnt in d[] : if cnt > 0
|
||||
prop = cnt / len s$
|
||||
entr -= prop * log prop 2
|
||||
.
|
||||
return entr
|
||||
.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue