Skip to main content

content_entropy_bits

Function content_entropy_bits 

Source
pub fn content_entropy_bits(tokens: &[Token], literals: LiteralNorm) -> f64
Expand description

Shannon entropy, in bits, of a token slice’s normalized-token distribution.

Low entropy marks degenerate repetition — a long literal table, a run of near-identical accessors — which is a noise signal rather than a finding. Any mode that reports clone groups scores its content the same way, so the signal means the same thing across modes.