edu.stanford.hci.r3.events.handlers
Class HandwritingRecognizer
java.lang.Object
edu.stanford.hci.r3.events.EventHandler
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.
Constructor Summary |
HandwritingRecognizer()
Gets access to the HandwritingRecognitionService, which wraps the communication with the
Handwriting Recognition Server. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
HandwritingRecognizer
public HandwritingRecognizer()
- Gets access to the HandwritingRecognitionService, which wraps the communication with the
Handwriting Recognition Server.
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()