A method for forming a maximal tree by searching statistical data of symbols
from
training data. A table is formed including a string having first and second ends,
and a symbol of the training data in the first end and a minimal number of preceding
symbols in the training data to make a context unique for the symbol. The contexts
are sorted in lexical order with priority on the first end. A device for forming
a maximal tree by searching statistical data of symbols from training data. The
device forms a table including a string having first and second ends, and a symbol
of the training data in the first end and a minimal number of preceding symbols
in the training data to make the context unique for the symbol. The device sorts
the contexts in lexical order with priority on the first end.