def recognizeHandwriting(strokes): """Take in a list of strokes, send them to MyScript, and return any recognized handwriting""" mscRequest = MyScriptHwrRequest(inputUnitList=[MyScriptInputUnit.fromStrokeList(strokes)]) response = getRequestResponse('hwrInput', mscRequest) return response
def recognizeEquation(strokes): """Take in a list of strokes, send them to MyScript, and return any recognized equation""" mscRequest = MyScriptEqnRequest.fromInputUnit(MyScriptInputUnit.fromStrokeList(strokes)) response = getRequestResponse('equationInput', mscRequest) return response
def __init__(self, hwrInputType = ['SINGLE_LINE_TEXT', 'CHAR', 'WORD'][0], **kwargs): MyScriptInputUnit.__init__(self, **kwargs) self.hwrInputType = hwrInputType