cmake -S . -B release/ -D CMAKE_BUILD_TYPE=Release
cmake --build release/ --clean-first
It will produce a standalone cli application (jagger_cli.js) that can run directly with `node`, and a library (jagger-binding.js) that can be loaded in a web browser.
You can run it with node using (it only runs when using pipes, and throws an error when running interactively for some reason)
cd release
echo こんにちは | node jagger_cli.js -m kwdlc/patterns
Unfortunately, it is significantly slower than the C++ verison (20s vs 12min when running with the dataset provided by `benchmark/prepare_dataset.py`). However, by some profiling it seems that most time is spending on IO operations. Upon further inspection, that fact that emscripten flushes the buffer every time a linebreak is encountered, seems to be a major factor (glibc only does this when running interactively).
It is working in progress, no document is available now. You can check the demo site, and its source code.
This is based on jagger-python. The original project is jagger.