+
Skip to content

imakira/jagger-wasm

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Demo Site

Jagger Wasm Demo

Compile Project

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.

jagger_cli.js

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

jagger-binding.js

It is working in progress, no document is available now. You can check the demo site, and its source code.

Credit

This is based on jagger-python. The original project is jagger.

About

wasm port for Jagger(C++ implementation of Pattern-based Japanese Morphological Analyzer)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 58.2%
  • CMake 32.8%
  • Python 5.6%
  • Shell 2.3%
  • Nix 0.8%
  • Makefile 0.2%
  • Batchfile 0.1%
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载