Y
Y
Yuri2014-12-04 17:36:19
PHP
Yuri, 2014-12-04 17:36:19

How can I calculate the match percentage of a string?

How can I calculate the match percentage of a string?
There is a form for adding a full name to an object, and there is a table with a full name + additional data.
the problem is that data is entered into the table with the full name from the old journal in which the entries were entered by hand, the handwriting is not always legible, therefore the full name is not always correct.
maybe something like this:
in the table there is Smirkov Ivon Aleksondrovich, but in fact he is Smirnov Ivan Aleksandrovich.
you need to do something so that the percentage of matching the string is calculated,
for example, if the percentage of matching is more than 70% + other parameters match, then add this data to the object.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
F
FanatPHP, 2014-12-04
@FanatPHP

habrahabr.ru/post/114947

A
Anton Shamanov, 2014-12-04
@SilenceOfWinter

https://php.net/function.similar-text

D
Dmitry, 2014-12-04
@dnovikoff

en.wikipedia.org/wiki/%D0%A0%D0%B0%D1%81%D1%81%D1%...

V
Victor, 2014-12-05
@Levhav

PHP has a similar_text function, do you need it in php?
php.net/manual/en/function.similar-text.php

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question