A method and apparatus for generating a template for use in handwriting
recognition are provided. In the method and apparatus text is obtained,
character strings in the text are identified, each character string being
formed from a sequence of one or more characters and each character
having a respective type, a sequence of character types is determined for
each character string and a template is defined for each character type
sequence.