Skip to content
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

Built-in Split Chinese Characters #388

Open
taozhiyu opened this issue Dec 21, 2023 · 2 comments
Open

Built-in Split Chinese Characters #388

taozhiyu opened this issue Dec 21, 2023 · 2 comments

Comments

@taozhiyu
Copy link

As code here:

lunr.zh.stopWordFilter = lunr.generateStopWordFilter(
"的 一 不 在 人 有 是 为 以 于 上 他 而 后 之 来 及 了 因 下 可 到 由 这 与 也 此 但 并 个 其 已 无 小 我 们 起 最 再 今 去 好 只 又 或 很 亦 某 把 那 你 乃 它 吧 被 比 别 趁 当 从 到 得 打 凡 儿 尔 该 各 给 跟 和 何 还 即 几 既 看 据 距 靠 啦 了 另 么 每 们 嘛 拿 哪 那 您 凭 且 却 让 仍 啥 如 若 使 谁 虽 随 同 所 她 哇 嗡 往 哪 些 向 沿 哟 用 于 咱 则 怎 曾 至 致 着 诸 自".split(
" "
)

when I tried to define "涛之雨" as a phrases, it will not work, cause "之" will be removed, and it comes to "涛雨" (and finally split into "涛" and "雨").

The lucky in misfortune is that when searching "涛之雨" it will still work cause when searching "涛之雨", it will match "涛??雨", and works as well.

@weareoutman
Copy link
Member

Try this option zhUserDict, E.g.:

zhUserDict: "涛之雨\n云之南"
image

@taozhiyu
Copy link
Author

Try this option zhUserDict, E.g.:

zhUserDict: "涛之雨\n云之南"
image

Unfortunately, that doesn't work.In the code shown above, “之” will be removed.

Fine, I'll retry the zhUserDict instead of zhUserDictPath, I'm not sure is there any difference between them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants