-
Notifications
You must be signed in to change notification settings - Fork 8
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
Deps updates since commit 86ee9c6 cause CJK characters *fuzzy* search throw error message of "undefined" #87
Comments
Hi @c0001, thanks for the report and the investigation! There seems to be one issue already: leeoniya/uFuzzy#14 Could you also send me some text examples which cause the issue? Then I can use this to replicate. Thanks! |
I've check the leeoniya/uFuzzy#14 issue which says ufuzzy may const ufuzzy = require('@leeoniya/ufuzzy')
let opts = {
unicode: false,
interSplit: "(\p{Unified_Ideograph=yes})+"
};
let uf = new ufuzzy(opts)
const list = ['Javascript太棒了', 'Javascript素晴らしい', 'Javascript너무훌륭해훌륭해']
let strs = {cn: '太棒', jp: 'らし', kr: '훌륭'}
for (let i in strs) {
console.log(i + ':' + uf.filter(list, strs[i]));
} If I don't specify I just make a little bit try, hope that's useful.
The contents in above code example may be enough?
I've tested this lastest commit yet, still throwing same error.
Yeah, by the investigation, I think that should be but may be Thanks! |
Hi Briant, ok, I got it. So if I can fix this issue by just configuring the But since you obviously can check out and build this project, I'll create a PR and can merge it - before making a release out of it. Then you and I can test a bit. |
Ok, merged it. For me it seemed to work fine - could you also try out and verify? |
Issued by Fannon#87, we should provide this to let multilingual searching be capable, robust and following user side specifications via doing more tweaks of uFuzzy(@leeoniya/ufuzzy). See also: - leeoniya/uFuzzy#14 - https://github.com/leeoniya/uFuzzy#how-it-works
Issued by Fannon#87, we should provide this to let multilingual searching be capable, robust and following user side specifications via doing more tweaks of uFuzzy(@leeoniya/ufuzzy). See also: - leeoniya/uFuzzy#14 - https://github.com/leeoniya/uFuzzy#how-it-works
Issued by Fannon#87, we should provide this to let multilingual searching be capable, robust and following user side specifications via doing more tweaks of uFuzzy(@leeoniya/ufuzzy). See also: - leeoniya/uFuzzy#14 - https://github.com/leeoniya/uFuzzy#how-it-works
Issued by Fannon#87, we should provide this to let multilingual searching be capable, robust and following user side specifications via doing more tweaks of uFuzzy(@leeoniya/ufuzzy). See also: - leeoniya/uFuzzy#14 - https://github.com/leeoniya/uFuzzy#how-it-works
Thanks, that's seems worked for me as well, but I think that's not a usual way since Thus, I make a new pull-request to provide a |
yes, |
Thanks for issuing the internal mechanism of option const process = require('process')
const ufuzzy = require('@leeoniya/ufuzzy')
let opts = {
interSplit: "(^\\s|\\p{P})+",
};
let uf = new ufuzzy(opts)
const list = ['Javascript 太棒了', 'Javascript素晴らしい', 'Javascript너무훌륭해훌륭해']
let strs = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '太 棒', '素\t晴 ら', '훌”륭\t\t해 훌']
let c = 0
for (let i in strs) {
let j = uf.filter(list, strs[i])
if (!j) {
console.log('\'' + strs[i] + '\'' + ': ' + j);
c++;
}
}
if (c!=0) {
console.log("--> Failure of some letter search, Abort!")
process.exit(1)
} else {
console.log("--> All of searching available, Done!")
} This given the result of
But if I changed
That's why? With checking uppon my previous post in this issue, if I change the In the other hand, can you give more description of uFuzzy's designation of Thanks! |
Thanks @c0001 for working on further clarifying this! So I'll revert my (then premature) fix in the master branch and wait until we found a good solution that works well for both Latin/Roman and CJK search items. I do like the idea of just exposing uFuzzyOptions directly for power users. But I hope that we also find a more general, user friendly fix :) |
According to #91, We have flexible The problem is for those users are not familiar with uFuzzy
Thanks! |
@c0001 : If you have any further insights how to best configure uFuzzy for your case, feel free to propose a better README fix or mention. In case we find a solution which works general-purpose, we can either have it in by default or if it comes with drawbacks, then have it as a dedicated option (like Shall we close this or keep it open? Your call. |
Of course I will, I've made some changes to that but hadn't got the best way even if following the leeoniya's suggestion to use fully punctuations and whitespace binding to
I've preferred to halt this issue as |
Ok, great. Thanks again! |
Hi maintainer:
For recent 1.8.5 release checking out on my usage side, all of fuzzy search method (i.e. any search mode unless precise) thru CJK (i.e. chinese, japan and korean) prefix gives me an error message of:
without any candidates listed anymore.
I've spent some time to investigate the problem by checking out recently git commits for locating the final no-problem commit, it is 98ee21e. And I've compared the latest commit upates content again with that no-problem commit to found that the only break changes between is the deps updates via commit 86ee9c6.
In my test, when I revert the deps updates via commit 86ee9c6 based on latest commit (i.e. the main branch), the problem is gone.
I've not test which dep's updating caused this issue, hope for founding and helping me how to fix this problem.
Thanks.
The text was updated successfully, but these errors were encountered: