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 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