<<>> <> <> <> <> <<>> Dynamic hanwriting recognition. Dynamic means interactive, recognition of each character with user feedback. How to help me a) I'm starving for feedback b) I want your handwriting samples for the training database: 1) Hit the "training" entry in the menu, and use only the "REPLAY" line of the training widget. 2) Whenever a character is not recognized correctly, hit the "remember" button. 3) Eventually, hit the "write" button. 4) Send me that file (or a pointer to the file). User interface The command "X11Handwriting" creates a handwriting recognition widget. The Handwriting Recognition widget has four rows 1) A label displaying the recognized text and accepting gestures 2) A box row for drawing characters 3) A 1st command row 4) A 2nd command row for interoperation with intelligent tools The label displaying the recognized text Listens to some simple gestures: -Strike out some characters (horizontal line) -Set the "input focus" (tap) -Stuff the X selection (checkmark) -Change capitalization (/ pointing upwards) -Make control character (\ pointing upwards) The 1st command row for local command Menu... Shows the main pop up menu. cap Changes capitalization of last recognized character. 2nd Use second choice of last recognized character. space Insert a space. Xset Simulates keyboard entry of the prepared text with artifical events (Also puts the text in the primary selection and the clipboard) Xcr Simulates a keyboard entry with artifical events Xbs Simulates a keyboard entry with artifical events The 2nd command row for interoperation with intelligent tools SET Takes the recognized text and stuffs it into the primary selection and the clipboard SET+ Like set but also adds a linefeed r-clear Clears the widget with the input focus r-back Backspace one character on the widget with the input focus. enter Performs "ENTER" operation on the widget with the input focus. next Like using the "NEXT" key on the widget with the input focus. The main pop up menu help Opens this document training Opens a "handwriting recognition training" widget. uni-strokes Recognizes unistrokes characters Side effect: switching to uni selects the default unistrokes training database latin-alphabet Recognizes multi stroke characters (e.g. the latin alphabet) Side effect: switching to latin selects the default latin training database pseudo keyboard Creates a widget with a pseudo keyboard for the alphabetic characters Different mouse or pen button for capitalization extra keyboard Creates a widget with a pseudo keyboard for the numeric and special characters The Handwriting Recognition training widget has five rows A REPLAY row for regressions and data aquisition REPLAY replays last entry from the regression database and remove it from the regression database. remember remembers the last strokes in the regression database write makes up a filename and write the regression database onto it new nilout the regression database read read the regression database from named file. file file name for loading the regression database A DB row accessing the "training database" DB: inert label write: Make up a filename and write the training data base. new: Nilout the training database. This needs to re-read of course. merge: Read and merge in a training data base from named file. file: File name used for reading the training database A TRAIN row "training commands" row TRAIN: Add the last strokes to the data base forget1: Remove the last best "recognized" strokes from the data base forget2: Remove the last second best "recognized" strokes from the data base char: A character field for the character to be trained. This field has an inoperative default to protect against the frequent error of training an unspecified character. 3 character fields, "badness" and "character" values The smaller a badness value, the better match was found. 1) The normalized strokes of the last recognized character 2) The strokes of the best match from last recognition 3) The strokes of the second best match from last recognition The special X11Handwriting-TrainingMenu command Use X11Handwriting-TrainingMenu EntryName {FullPathFileName|Default} To enter or remove options to the training database menu. If multiple filenames are used, databases will be merged. About interoperability There are four methods how to "copy" the recognized text into an application Primary selection Defined as side effect of using the SET, SET+ or Xset commands. Using these methods is save, but it requires the application to fetch the data. Clipboard Always set together with the Primary selection. Simulated keyboard events Xset, Xcr, Xbs Would be nice, but: most applications deny simulated keyboard events from other clients because of the opened security hole. This is a security hole. Private communication convention SET, SET+, r-clear, r-back, enter next All Cedar XTk applications listen to this method. This is a security hole. User interface hints This package uses a quit simple recognition method. Drawn strokes are normalized to standard size. Use the aspect ratio instead of the size to to distinguish between capital and small letters. Training might be done with a keyboard. In real field usage without a keybord: It is possible to set the text fields of the training database using X selections. It is also possible to set those fields using another instance of the handwriting recognition widget. Commas, and, colons can not be recognized reliably with the current recognition algorithm. The workaround is to draw dots, or, semicolons first and then change capitalizations Client interface Handwriting.mesa The Handwriting.mesa package contains a client interface for the recognition engine. While Handwriting references Xl.Point it does not import Xl except for accessing types. XTkGestureInput.mesa Gesture input is more general and therefore separayted out. X11SimulateKeyInput.mesa This is sort of ugly and a separate interface so it can either be ignored or used by other applications. Private communication convention The recognized text is always placed into an X selection with name "PARC_HWR_SELECTION". The $Handwriting convention can be used with XlCutBuffers.mesa to access "PARC_HWR_SELECTION" The SET command causes also ClientMessage events with the "PARC_Handwriting" type. xrdb resource database Defaults values: X11Handwriting.FeedbackFont: 12x24 XTkGestureInput.StrokeWidth: 0 X11Handwriting.ActiveHeight: 60 on MPad 120 on Liveboard From the xterm man page (Has nothing to do with X11Handwriting) *allowSendEvents: true ! Specifies whether or not synthetic key and button events (generated using ! the X protocol SendEvent request) should be interpreted or discarded. The ! default is ``false'' meaning are discarded. Note that allowing such events ! creates a very large security hole.