Skip to main content

bigram_priority

Function bigram_priority 

Source
pub fn bigram_priority(a: u8, b: u8) -> u32
Expand description

Reconstructs the frequency-ranking priority of the ascii bigram (a, b). Absent or non-ascii bigrams resolve to 0; present bigrams get a strictly positive, unique priority where a higher value means a more frequent bigram. This priority is used to split strings into smaller n-grams.