You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now lunr-languages uses the default white-space-based stemmer for most languages, and handful of custom stemers for other languages (th, ja, zh). Additionally, the zh stemmer is only available in Node.js because it uses C++ extensions.
We could reduce bundle size, and make zh usable in the browser by switching to Intl.Segmenter for all languages.
Right now
lunr-languages
uses the default white-space-based stemmer for most languages, and handful of custom stemers for other languages (th
,ja
,zh
). Additionally, thezh
stemmer is only available in Node.js because it uses C++ extensions.We could reduce bundle size, and make
zh
usable in the browser by switching toIntl.Segmenter
for all languages.The downside to this approach is that Firefox is the only major browser that has not implemented the Stemmer API, and we would also lose support for Node.js, which would be a deal breaker.
I have a working proof of concept here where I use the stemmer specifically for
zh
to gain the ability to use it in browser.The text was updated successfully, but these errors were encountered: