edu.stanford.hci.r3.events.handlers
Class HandwritingRecognizer

java.lang.Object
  extended by edu.stanford.hci.r3.events.EventHandler
      extended by edu.stanford.hci.r3.events.handlers.HandwritingRecognizer

public abstract class HandwritingRecognizer
extends EventHandler

Produces ASCII text from input samples. Listeners can be notified whenever we have enough text.

This software is distributed under the BSD License.


Field Summary
 
Fields inherited from class edu.stanford.hci.r3.events.EventHandler
parentRegions
 
Constructor Summary
HandwritingRecognizer()
          Gets access to the HandwritingRecognitionService, which wraps the communication with the Handwriting Recognition Server.
 
Method Summary
 void clear()
          Clear the internal strokes storage.
abstract  void contentArrived()
           
 void handleEvent(PenEvent event)
          Capture Ink Strokes and notify listeners on every Pen Up.
 java.lang.String recognizeHandwriting()
           
 java.util.List<java.lang.String> recognizeHandwritingWithAlternatives()
           
 java.lang.String toString()
           
 
Methods inherited from class edu.stanford.hci.r3.events.EventHandler
addParentRegion, getParentRegions, showMe
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HandwritingRecognizer

public HandwritingRecognizer()
Gets access to the HandwritingRecognitionService, which wraps the communication with the Handwriting Recognition Server.

Method Detail

clear

public void clear()
Clear the internal strokes storage.


contentArrived

public abstract void contentArrived()

handleEvent

public void handleEvent(PenEvent event)
Capture Ink Strokes and notify listeners on every Pen Up.

Specified by:
handleEvent in class EventHandler

recognizeHandwriting

public java.lang.String recognizeHandwriting()
Returns:
the top-ranked ASCII translation for the ink strokes.

recognizeHandwritingWithAlternatives

public java.util.List<java.lang.String> recognizeHandwritingWithAlternatives()
Returns:
a list of the top ten recognized results (including the top one, at position 0)

toString

public java.lang.String toString()
Specified by:
toString in class EventHandler
Returns:
the Event Handler's Name
See Also:
edu.stanford.hci.r3.events.ContentFilter#toString()

Copyright 2006 Stanford University