-
Notifications
You must be signed in to change notification settings - Fork 163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add chinese support #53
Conversation
Great! |
@dadiorchen Please refer to nodejieba for the detail. |
@repairearth Do you have time to solve the conflict so that the owner could merge this? 💐 |
@mapleeit done. |
Hi, @MihaiValentin Please take a look at this PR when you have time. Thanks! |
感谢!希望能正式实现! |
@repairearth Did you test multiLanguage? I use your repo now. When use single language,it works well. But when use multiLanguage, the search result looks like no word segmentation. I have to search exactly word. |
@repairearth thank you so much for your effort :) When loading a serialized index as you described, it works, but the segmenter is not loaded. Is there a way to load the segmenter for searching on the browser side? For example, given the phrase "他们扭头一看" |
Is there any progress in this function? |
+1 for this PR. Hope it's resolved and merged! |
Hope Chinese support can be added soon |
@repairearth @MihaiValentin do you know when this might be merged? Thanks both |
Hi , Felix: I think this repo is no longer maintained,. Can you checkout to this branch ? |
终于看到中文的了!希望赶紧合并 |
希望支持中文通过 |
I've recently had success getting lunr working with Chinese manually using the approach described here: https://github.com/stkevintan/hugo-lunr-zh#usage Even so, it would be great to have Chinese supported via this lib. |
Feeling sad that this PR is still not merged in 2021. I forked the project and merged this PR into it, as well as publishing a new npm package called lunr-languages-zh for those who are in need of the support for Chinese. Feel free to inform me if I shouldn't do this... :( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💯
Could anybody please merge this PR? Thank you!
@MihaiValentin can you merge this, or appoint someone to take over merging requests to the repo? |
Thanks @repairearth for contributing with this! |
What i did
Why i did
I looked for the chinese support for lunr, but there was none, so i built it.
It can only run on node side, for browser side, you must first create a serialised index with JSON and load it via
Here is an example
https://github.com/humanseelabs/gatsby-plugin-lunr/blob/master/src/gatsby-browser.js
I use
nodejieba
as the chinese tokenizer, and will not want to support other chinese tokenizers, i thinknodejieba
is good enough.