Commit Graph

10 Commits

Author SHA1 Message Date
Jeremy Wu
07310c7714 Fix pinyin fuzzysearch (#131)
* fix typo

* make function obsolete 

it is not used in the code

* rewrite the function that converts chinese chars to pinyin

1. Only difference in this rewrite is instead of returning 2D array, return as a combined single string of all the possible pinyin combination. Since fuzzy search does character matching, this shouldn't be a problem.

2. Added a function that returns a custom language converter. In this case Pinyin converter. New converters can be added.

* Use new language converter param + strip out ScoreForPinyin method

* update

* Change parameter name

* fix failing tests

* WIP

* Remove todo

There should be some distinction between score after precision filter and actual raw score derived from FuzzySearch. Although so far RawScore is used in testing, but it seems to describe the structure. Originally it was to avoid assigning score directly as it would be hard to reason about that output of FuzzySearch score is.

* Add constructors, remove default to enforce required properties

* remove setting rawscore in SearchPrecision

* Change method name to reflect intention

* Change parameter name + update comment

* update

* Remove params comment

Co-authored-by: theClueless <14300910+theClueless@users.noreply.github.com>
2020-01-20 01:06:16 +02:00
Amir Tepper
a3ba2276e2 renamed for Defualt match option 2019-10-20 15:45:06 +03:00
Amir Tepper
0e241a0fc5 added empty match option 2019-10-17 13:37:09 +03:00
Jeremy Wu
fbb5d4a4a6 Make FuzzMatcher class obsolete and keep backwards compatibility 2019-09-29 14:26:15 +10:00
bao-qian
0daa3a8f57 ReSharper: remove redundant code 2016-01-06 21:34:42 +00:00
bao-qian
ad8b6c806d Optimize using directives 2015-10-30 23:23:01 +00:00
qianlifeng
4d3df4cda6 fix #256 2015-02-27 09:28:07 +08:00
cxfksword
de13ad1cd5 Optimize fuzzy match 2014-03-24 21:14:10 +08:00
Yeechan Lu
6dcd2e4b03 Optimize Program results 2014-03-18 13:17:09 +08:00
cxfksword
a9fa1fb66b add fuzzy string match support for Programs plugin 2014-02-09 01:39:23 +08:00