You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+16-16
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ Zadeh is a blazing fast library for fuzzy filtering, matching, and other fuzzy t
9
9
### features
10
10
11
11
- fuzzy filter through an array of candidates (`StringArrayFilterer`)
12
-
- fuzzy filter through a nested tree-like objects (`TreeFilterer`)
12
+
- fuzzy filter through nested tree-like objects (`TreeFilterer`)
13
13
- Special treatment for strings that have separators (space ``, hyphen `-`, underline`_`)
14
14
- Special treatment for path-like strings (string separated by `\` or `//`)
15
15
- give an array of indices at which the query matches the given string (`match`)
@@ -22,7 +22,7 @@ Zadeh is a blazing fast library for fuzzy filtering, matching, and other fuzzy t
22
22
23
23
## Usage from C++
24
24
25
-
This is a headeronly library. Include `./src/zadeh.h` and build it in your application.
25
+
This is a header-only library. Include `./src/zadeh.h` and build it in your application.
26
26
27
27
`examples/example1.cpp`:
28
28
@@ -89,7 +89,7 @@ const zadeh = require("zadeh")
89
89
90
90
### StringArrayFilterer
91
91
92
-
`StringArrayFilterer` is a class that allows to set the `candidates` only once and perform filtering on them multiple times. This is much more efficient than calling the `filter` function directly.
92
+
`StringArrayFilterer` is a class that allows setting the `candidates` only once and perform filtering on them multiple times. This is much more efficient than calling the `filter` function directly.
93
93
94
94
<details>
95
95
<summary>`StringArrayFilterer` API</summary>
@@ -117,12 +117,12 @@ export class StringArrayFilterer {
117
117
*
118
118
* @paramquery A string query to match the dataKey of each candidate against.
119
119
* @paramoptions Options
120
-
* @returns Returns an array of numbers indicating the index of the chosen candidate sorted by best match against the query.
120
+
* @returns Returns an array of numbers indicating the index of the chosen candidate sorted by the best match against the query.
TreeFilterer is a filters the given query in the nodes of the given array of trees, and returns an array of filtered
222
-
trees (or the indices of the filter candidates). A tree object is an object in which each entry stores the data in its `dataKey` and it has (may have) some
221
+
TreeFilterer filters the given query in the nodes of the given array of trees and returns an array of filtered
222
+
trees (or the indices of the filter candidates). A tree object is an object in which each entry stores the data in its `dataKey`, and it has (may have) some
223
223
children (with a similar structure) in its `childrenKey`
**Deprecation Note**: use `StringArrayFilterer` or `ObjectArrayFilterer` class instead. `filter` internally uses this class and in each call, it sets the candidates from scratch which can slow down the process.
448
+
**Deprecation Note**: use `StringArrayFilterer` or `ObjectArrayFilterer` class instead. `filter` internally uses this class, and in each call, it sets the candidates from scratch, which can slow down the process.
449
449
450
450
</details>
451
451
@@ -457,9 +457,9 @@ API is backward compatible with Fuzzaldrin and Fuzzaldrin-plus. Additional funct
457
457
458
458
Zadeh achieves 10x-20x performance improvement over Fuzzaldrin plus for chromium project with 300K files. This high performance is achieved using the following techniques.
459
459
460
-
- Uses native C++ bindings that provides`~4x` performance benefit.
460
+
- Uses native C++ bindings that provide`~4x` performance benefit.
461
461
- Use multiple threads to parallelize computation to achieve another `~4x` performance benefit.
462
-
- Some miscellaneous improvements provide additional benefit.
462
+
- Some miscellaneous improvements provide additional benefits.
463
463
464
464
This project potentially solves the following Atom fuzzy-finder issues if used.
465
465
https://github.com/atom/fuzzy-finder/issues/271 and https://github.com/atom/fuzzy-finder/issues/88
0 commit comments