CodePudding user response:
What is the most similar?1, equal to? Using if *==*
2, contain or be included? With sliced
3, the similar format? 2 + 1?
CodePudding user response:
The fuzzy matching to consider, format, type, length, starting at the end, and fault tolerance, and so on! What are you going to do, the search engines do the somebody else all spent a lot of money a lot of timeCodePudding user response:
According to your now equals the code directly why similar, similar to the fuzzy matching search he belongs to, the cost is a problemCodePudding user response:
Such as array has a "high-tech", "industrial assets", "high and new technology"] three elements, and the incoming "high tech" to match, with the highest similarity must be "high and new technology" this element in the array, is there any ways to do,CodePudding user response:
The solution:The first method:
There is, first Chinese word segmentation, abstract into vector, vector Angle calculation,
To search for "similarity algorithm (cosine similarity),
The second method:
The similarity of the string (extended KMP)
Please look at the article
https://blog.csdn.net/update7/article/details/72628827
CodePudding user response: