This program is free software: you can redistribute it and/or modify
This program is free software: you can redistribute it and/or modify it
it under the terms of the GNU General Public License as published by
under the terms of the GNU General Public License as published by the Free
the Free Software Foundation, either version 3 of the License, or
Software Foundation, version 3.
(at your option) any later version.
This program is distributed in the hope that it will be useful,
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
but WITHOUT ANY WARRANTY; without even the implied warranty of
@ -25,19 +23,17 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
along with this program. If not, see <http://www.gnu.org/licenses/>.
```
# Algorithm
# Algorithm
The logic of this application is pretty simple:
A logic of this application is pretty simple:
* All fields in the file are divided into separate words.
* All fields in the file are divided into separate words.
* Each unique word in the search string is compared to the words in the file.
* Each unique word in the search string is compared to the words in the file.
* If the match is exact, the highest score is awarded.
* If the match is exact, the highest score is awarded.
* If there is an inaccurate coincidence, the [Levenshtein distance](https://en.wikipedia.org/wiki/Levenshtein_distance) is calculated and the word score is formed on its basis.
* If there is an inaccurate coincidence, the [Levenshtein distance](https://en.wikipedia.org/wiki/Levenshtein_distance) is calculated and the word score is formed on its basis.
* Results are sorted in descending order of accuracy.
* Results are sorted in descending order of accuracy.