A computer-implemented method for encoding a handwritten stroke set, each of
the
handwritten stroke set being representative of a constituent stroke of an ideographic
character, to obtain an encoded input sequence. The method includes ascertaining
a shape of a first stroke of the handwritten stroke set and ascertaining one of
a location information and a size information pertaining to the first stroke. The
method further includes assigning a first code to the encoded input sequence responsive
to a determination of the shape of the first stroke and a determination of the
one of the location information and the size information of the first stroke. The
first code is predefined to represent the shape of the first stroke and the one
of the location information and the size information of the first stroke. The first
code is sufficiently unique to distinguish the first code from other codes representing
other permutations of shape and the one of the location information and the size
information of the first stroke.