cmfcmf / docusaurus-search-local

Offline / Local Search for Docusaurus v2. Try it live at:
https://cmfcmf.github.io/OpenWeatherMap-PHP-API/
MIT License
438 stars 67 forks source link

Initial work on supporting Chinese (zh) #47

Closed cmfcmf closed 3 years ago

cmfcmf commented 3 years ago

TODO: Tokenization on the client does not yet work, because nodejieba uses cppjieba, which we can't run in the browser. We should look into using node-rs/jieba instead, because that can be compiled to WASM as shown by jieba-wasm.

It might make sense to bump the lunr-languages version nontheless, since it also added support for Hindi, which should already work. Full changelog: https://github.com/MihaiValentin/lunr-languages/compare/1.4.0...1.8.0

cmfcmf commented 3 years ago

Let's merge this for now. I have added a simple tokenizer for the search input until we figure out how to best compile jieba for web assembly.