https://github.com/ahmetaa/zemberek-nlp/blob/master/core/src...
it is used for language model compression. Also there is a Dart implementation as part of a small library.
https://github.com/ahmetaa/poppy