Using C#, how can I replace similar words?

后端 未结 5 2073
孤城傲影
孤城傲影 2021-02-04 17:26

Assuming these two strings:

string s1=\"control\";
string s2=\"conrol\"; (or \"ocntrol\", \"onrtol\", \"lcontro\" etc.)

How can I programatical

5条回答
  •  你的背包
    2021-02-04 18:05

    You can use Levenshtein Distance which would give you a rank on how close the two words are. You need to decide at which rank you do the replace .

提交回复
热议问题