Re: matchfuzzy scoring

2020-10-16 Fir de Conversatie Bram Moolenaar
Christian wrote: > On Do, 15 Okt 2020, Yegappan Lakshmanan wrote: > > > On Thu, Oct 15, 2020 at 12:24 PM Bram Moolenaar wrote: > > > > > > Christian wrote: > > > > > Indeed. Initially I thought adding a bonus for a word boundary would > > be > > > needed, therefore my naive att

Re: matchfuzzy scoring

2020-10-16 Fir de Conversatie Maxim Kim
пятница, 16 октября 2020 г. в 09:36:23 UTC+3, Maxim Kim: > > On 16.10.2020 9:14, Christian Brabandt wrote: > > On a related note, I wonder whether SEPARATOR_BONUS should also be added > > for path delimiters (`/` on unix `\` on windows). > > > I think it makes sense: > > Another example: ht

Re: matchfuzzy scoring

2020-10-15 Fir de Conversatie Maxim Kim
On 16.10.2020 9:14, Christian Brabandt wrote: On a related note, I wonder whether SEPARATOR_BONUS should also be added for path delimiters (`/` on unix `\` on windows). I think it makes sense: let g:tdata = ['hello/world','hellopworld', 'helloworld'] echo g:tdata->matchfuzzy('llwod') curre

Re: matchfuzzy scoring

2020-10-15 Fir de Conversatie Christian Brabandt
On Do, 15 Okt 2020, Yegappan Lakshmanan wrote: > Hi Bram, > > On Thu, Oct 15, 2020 at 12:24 PM Bram Moolenaar wrote: > > > Christian wrote: > > > Indeed. Initially I thought adding a bonus for a word boundary would be > > needed, therefore my naive attempt to score additionally

Re: matchfuzzy scoring

2020-10-15 Fir de Conversatie Yegappan Lakshmanan
Hi Bram, On Thu, Oct 15, 2020 at 12:24 PM Bram Moolenaar wrote: > > Christian wrote: > > > Indeed. Initially I thought adding a bonus for a word boundary would be > > needed, therefore my naive attempt to score additionally on the end of > > the match. So how about this, which adds an additional

Re: matchfuzzy scoring

2020-10-15 Fir de Conversatie Bram Moolenaar
Christian wrote: > Indeed. Initially I thought adding a bonus for a word boundary would be > needed, therefore my naive attempt to score additionally on the end of > the match. So how about this, which adds an additional bonus only for a > complete match. > > iff --git a/src/search.c b/src/sear

Re: matchfuzzy scoring

2020-10-15 Fir de Conversatie Yegappan Lakshmanan
Hi Christian, On Thu, Oct 15, 2020 at 9:33 AM Christian Brabandt wrote: > > > > > Yeah, but shouldn't a complete match get an additional bonus? > > > > > > Yes. A complete sequential match should get an additional bonus. But the > > changes you posted only checks for whether the previous cha

Re: matchfuzzy scoring

2020-10-15 Fir de Conversatie Christian Brabandt
On Do, 15 Okt 2020, Yegappan Lakshmanan wrote: > Hi Christian, > > On Thu, Oct 15, 2020 at 8:55 AM Christian Brabandt wrote: > > > On Do, 15 Okt 2020, Yegappan Lakshmanan wrote: > > > Hi, > > > > On Wed, Oct 14, 2020 at 11:21 PM Maxim Kim wrote: > > > >     Hi, I wo

Re: matchfuzzy scoring

2020-10-15 Fir de Conversatie Yegappan Lakshmanan
Hi Christian, On Thu, Oct 15, 2020 at 8:55 AM Christian Brabandt wrote: > > On Do, 15 Okt 2020, Yegappan Lakshmanan wrote: > > > Hi, > > > > On Wed, Oct 14, 2020 at 11:21 PM Maxim Kim wrote: > > > > Hi, I wonder why "better" candidate has lower score than the others: > > > > https://i.i

Re: matchfuzzy scoring

2020-10-15 Fir de Conversatie Yegappan Lakshmanan
Hi Dominique, On Thu, Oct 15, 2020 at 4:25 AM Dominique Pellé wrote: > Christian Brabandt wrote: > > > On Mi, 14 Okt 2020, Maxim Kim wrote: > > > > > Hi, I wonder why "better" candidate has lower score than the others: > > > > > > https://i.imgur.com/NPhKNsZ.png > > > > > > tried to search `vim

Re: matchfuzzy scoring

2020-10-15 Fir de Conversatie Christian Brabandt
On Do, 15 Okt 2020, Yegappan Lakshmanan wrote: > Hi, > > On Wed, Oct 14, 2020 at 11:21 PM Maxim Kim wrote: > > Hi, I wonder why "better" candidate has lower score than the others: > > https://i.imgur.com/NPhKNsZ.png > > tried to search `vimrc` and `.vim/vimrc` has lower score th

Re: matchfuzzy scoring

2020-10-15 Fir de Conversatie Yegappan Lakshmanan
Hi, On Wed, Oct 14, 2020 at 11:21 PM Maxim Kim wrote: > Hi, I wonder why "better" candidate has lower score than the others: > > https://i.imgur.com/NPhKNsZ.png > > tried to search `vimrc` and `.vim/vimrc` has lower score than > `.vim/vimrc_colors`. > > > The reason is that 'vimrc' matches in mu

Re: matchfuzzy scoring

2020-10-15 Fir de Conversatie Christian Brabandt
On Do, 15 Okt 2020, Dominique Pellé wrote: > If I understand this solution, searching for "vimrc" will > prefer "foo_vimrc" over "vimrc_foo", which does not > look ideal. correct. In your mentioned case, I would actually argue that there is no best case that everybody agrees on, either one do

Re: matchfuzzy scoring

2020-10-15 Fir de Conversatie Dominique Pellé
Christian Brabandt wrote: > On Mi, 14 Okt 2020, Maxim Kim wrote: > > > Hi, I wonder why "better" candidate has lower score than the others: > > > > https://i.imgur.com/NPhKNsZ.png > > > > tried to search `vimrc` and `.vim/vimrc` has lower score than > > `.vim/vimrc_colors`. > > The neighbor '_'

Re: matchfuzzy scoring

2020-10-14 Fir de Conversatie Christian Brabandt
On Mi, 14 Okt 2020, Maxim Kim wrote: > Hi, I wonder why "better" candidate has lower score than the others: > > https://i.imgur.com/NPhKNsZ.png > > tried to search `vimrc` and `.vim/vimrc` has lower score than > `.vim/vimrc_colors`. The neighbor '_' adds an additional bonus for scoring. Ther

Re: matchfuzzy scoring

2020-10-14 Fir de Conversatie Dominique Pellé
Maxim Kim wrote: > Minimal repro: > > let g:testfuzzy = ['vimrc', 'vimrc_colors'] > echom g:testfuzzy->matchfuzzy('vimrc') > > result: > ['vimrc_colors', 'vimrc'] I don't really know how it's scored, but here I would have thought that the first entry "vimrc" should have a better score than "vimrc

Re: matchfuzzy scoring

2020-10-14 Fir de Conversatie Maxim Kim
Minimal repro: let g:testfuzzy = ['vimrc', 'vimrc_colors'] echom g:testfuzzy->matchfuzzy('vimrc') result: ['vimrc_colors', 'vimrc'] четверг, 15 октября 2020 г. в 09:21:32 UTC+3, Maxim Kim: > Hi, I wonder why "better" candidate has lower score than the others: > > https://i.imgur.com/NPhKNsZ.p

matchfuzzy scoring

2020-10-14 Fir de Conversatie Maxim Kim
Hi, I wonder why "better" candidate has lower score than the others: https://i.imgur.com/NPhKNsZ.png tried to search `vimrc` and `.vim/vimrc` has lower score than `.vim/vimrc_colors`. -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text