"fillMaxScore" and "fillFirstAndSibling" should not be methods of "Predictor" because they are not related to prediction itself.
"(*Predictor).build" just should encode N-grams and store them into the trie.
Iterate Ngrams in "BuildPredictor".
Separate "storeKey" and "encodeNew", which they were a single function originally.
Create "predictor" subpackage. This package contains "Predictor" and internal data structures used by "Predictor".
Use the shorter name.
"Dump" should not be a method of "Predictor" because it is not related to prediction itself.