This project contains a small server, which wraps the WritePad-Handwriting-Recognition-Engine (see License and Copyright) to provide handwriting recognition via a simple REST-Interface.
- GCC / Make / etc
- pyton3, flask (python3-flask), flask-cors (
sudo pip3 install flask-cors
)
After checking out this repository, a few setup steps must be done:
- Create an
include
folder in the WritePadWrapper directory - Add the header files from the WritePad Handwriting Recognition Engine
- Create a
lib
folder in the WritePadWrapper directory - Build the WritePad Handwriting Recognition Engine library and copy the generated
libWritePadLib.a
file into the createdlib
folder - Checkout the jsoncpp repository and generate the header & source files. Add the content from the dist folder to the
include
folder - Create a build folder in the WritePadWrapper directory. Go into this folder and run
cmake .. && make
When running the python server, the path to the directory containing the created library above must be specified. This could be done as follows:
LD_LIBRARY_PATH=/path/to/WritePadWrapper/build python3 main.py
When the server should use dictionaries, make sure they are in the same folder from which the python server is started. Otherwise the recognition will be done without the help of those dictionaries.
The final folder structure should contain at least the following files:
WritePadWrapper
--CMakeLists.txt
--build
----libWritePadWrapper.so
--include
----InkWrapper.h
----RecognizerApi.h
----RecognizerWrapper.h
----gestures.h
----json
------json-forwards.h
------json.h
----jsoncpp.cpp
----langid.h
----recodefs.h
----recotypes.h
--lib
----libWritePadLib.a
--main.cpp
server
--English.dct
--German.dct
--main.py