CPC G06F 16/3343 (2019.01) [G06F 18/22 (2023.01); G06F 40/279 (2020.01); G06V 30/1983 (2022.01)] | 13 Claims |
1. A similarity processing method, comprising:
acquiring a first character string and a second character string;
determining a first edit distance between characters at respective corresponding positions of the first character string and the second character string according to a preset edit distance rule, and determining a character similarity based on the first edit distance and a first weight coefficient of the character similarity;
converting the first character string into a first pronunciation pattern code sequence and converting the second character string into a second pronunciation pattern code sequence;
determining a second edit distance between pronunciation pattern codes at respective corresponding positions of the first pronunciation pattern code sequence and the second pronunciation pattern code sequence according to the preset edit distance rule;
determining a pronunciation pattern similarity based on the second edit distance and a second weight coefficient of the pronunciation pattern similarity;
converting the first character string into a first character pattern code sequence, and converting the second character string into a second character pattern code sequence;
determining a third edit distance between character pattern codes at respective corresponding positions of the first character pattern code and the second character pattern code according to the preset edit distance rule;
determining a character pattern similarity based on the third edit distance and a third weight coefficient of the character pattern similarity;
determining a first numerical value based on the character similarity and the first weight coefficient, determining a second numerical value based on the pronunciation pattern similarity and the second weight coefficient, and determining a third numerical value based on the character pattern similarity and the third weight coefficient; and
determining a comprehensive similarity based on the first numerical value, the second numerical value, and the third numerical value, wherein the first weight coefficient, the second weight coefficient and the third weight coefficient each are greater than or equal to 0, and are smaller than or equal to 1.
|