HRE API
A Portable Handwriting Recognition
Engine Interface
Introduction
The handwriting recognition engine application program interface (HRE API) is
a 32 bit, portable interface between application programs and
handwriting recognition engines.
The API is being released to the Internet in hopes
that it will speed the availability of commercial quality handwriting
recognition engines and applications on Unix, and help foster university
research on new handwriting recognition technology.
Specific technical goals of the HRE API are as follows:
- Provide a functionally complete interface to handwriting recognition
engines based on different recognition technologies and available from
different vendors.
- Allow handwriting recognition engine vendors to supply technology-specific
enhancements that may not be generally available.
- Fully support multiple handwriting recognition engines in use at
the same time, both at the programmatic and system levels.
- Minimize dependence on the window system API by completely
decoupling the programmatic interface for handwriting recognition from
low-levels such as the pen driver and from higher levels such as
the window system look and feel.
- Fully support internationalization.
The API source is written in ANSI C for
ease of portability and connection with existing recognition engines.
The source code is free and can be used for any purpose, including
commercial, without any royalty or fee, as long as the user complies
with current U.S. export regulations and understands that the code has
been released on an "as is" basis, for which Sun provides absolutely
no warranty whatsover.
Short Description
The heart of the API is the recognition manager. The recognition manager
structures the interaction between an application and a handwriting
recognition engine. It
allows an application program to dynamically load handwriting recognition
engines packaged as dynamically linkable, shared libraries and
to access them without requiring
cumbersome specialized code for each different recognition engine. The
recognition manager also provides a function that allows an application
program to take advantage of specialized capabilities provided by a particular
recognition engine, such as on the fly training. This function allows the
recognition engine to
return a vector of specialized
functions, which the application program accesses via a header file
that was provided along with the recognition engine and
that describes the custom interface.
The application interacts with the recognition engine
using a buffered model. The
application program initializes the recognition engine
by setting the recognition
context. Strokes are added to the recognition engine's internal buffer by the
application, and
incremental translations are returned to the application if desired.
Stoke buffering in the recognition engine allows the recognizer to handle
languages such as Japanese, where context can be very important,
in addition to cursive English, where context can help to improve
recognition accuracy. After recognition is complete, the application
clears the recognizer's recognition context and stroke buffer.
Multiple recognition engines and multiple instances of the same recognition
engines can be active in a program at one time, since instances of each
individual engine are modelled as objects to which the application
program has a handle. The API also provides access to character prototype
files and dictionaries, and allows a recognizer to return gestures or
arbitrary objects, or to return correlations between recognized objects
and the pen strokes. The pen stroke structure is optimized for fast
communication of point vectors with the X window system, currently
the standard Unix window system, but that is the only window system
dependency in the API. Recognition engines are free to use multiple
threads internally, or to support multithreaded access.
The Design Specification
The design was developed together with a number of handwriting recognition
engine vendors representing a variety of technologies and
natural languages. The specification is also included as part of the
source code distribution.
Click here to read the design specification:
HRE API 2.0
The Source Code Distribution
The source code distribution contains the following pieces:
- Complete source for the recognition manager.
- Source for a sample recognition engine, based on the single stroke
gesture recognizer done by Dean Rubine at CMU. See Rubine, D., "Specifying
Gestures by Example", Proceedings of SIGGRAPH91, July, 1991
for more information. The code illustrates how to connect a
recognition engine to the API.
- An application program written using Athena widgets to illustrate
how to use the API and to provide a development environment for
recognizer developers who would like to quickly port their recognition
engines to the API without developing a lot of window system code.
- The design specification in Postscript.
The source is in Unix tar format. Click here to download the source:
HRE API Source Distribution
Linux Port
A Linux port has been done by David Allen. Click here to
download the source:
HRE API Linux Port.
The port is to the 2.2.13 Linux kernel, with the egcs-1.1.2 gcc compiler,
C library glibc-2.1.3-6 and the XFree86-3.3.6 X implementation,
running on an S3 server. If you have any questions about the Linux
port, please contact David directly by clicking here:
Contact David Allen.
Porting and Updates
Ports of the API to other operating systems will be made available
if they are sent to the author. The code is being distributed on
an as-is basis, and there is no further testing or verification
done on the code before it is posted. Each port
will be provided as a completely separate distribution as has
been done with the Linux port.
At this point, the code is no longer being maintained. Any bug fixes may
be incorporated if the source code for the fix is included, but no
further testing or verification will be done on the fixes.
For More Information:
Send email to james.kempf@sun.com.