Zeek a fuzzy finder in ZIG.
- if "patternzig" is in the mix and "pattern" is the search term it has the same score as "pattern"
- this should not be the case I guess
- this is because of the max of the hole array not only the last row
- have to reevaluate that there
- write the algo
- fix the algo
- pattern input
- choose output out of 10
- prev next
Simple input in lines. The input is evaluated against the pattern. The inputs with the highest score are up top. The solutions are cut off at 10. You choose a number. The input with the number gets printed to the standard output.
$ cat options | zeek "pattern"
1 patterns
2 patners
3 patties
4 panties
5 cat
6 ...
...
chose (1..10): 2
patterns
What if you want to add a pattern later (idea):
$ cat file | zeek
enter a pattern: pattern
-- options --
1 patterns
2 patners
3 patties
4 panties
5 cat
6 ...
...
chose (1..10, n, next, p, prev): 2
patterns