寻找类似词语的话阵列 [英] Find similar words in array of words

查看:2151
本文介绍了寻找类似词语的话阵列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我GOOGLE了这些天,但没有什么帮助。
我现在不能确定,如果可能,所以我想我只是在AKS计算器。

I googled these days but nothing helps. I m not sure now if its possible, so I thought I just aks at stackoverflow.

情况:
用户可以输入一个单词或一输入框。当他完成一次功能检查,如果这个词话阵列中 - 容易。现在,我想编写一个帮助,如果一个字母丢失或字母都写了错误的方式,消息应该弹出窗口。

The situation: The user can input a word or in a inputbox. When he finishes a function check if the word is in the array of words - easy. Now I wanna write a help, if one letter is missing or the letters are written the wrong way, a message should popout.

什么是搜索键?
我想:

What are the keys to search for? I tried:


  • 的javascript找到字符串数组

  • JavaScript的找到类似词语的阵列

  • JavaScript的正则表达式类似的话

  • ...更多

我希望你已了解了我的意思,而且可以给我一些提示。

I hope you undestand what i mean, and can give me some hints.

推荐答案

该Levenshtein距离是计算相似的词之间的距离的度量。对于每一个变化,混洗或丢失信的距离增加。你可以在这里阅读更多:
http://en.wikipedia.org/wiki/Levenshtein_distance

The Levenshtein distance is a metric for computing the distance between similar words. For each changed, shuffled or missing letter the distance is increased. You can read more here: http://en.wikipedia.org/wiki/Levenshtein_distance

和采取不同的语言实现的引用在这里:的http://en.wikibooks.org/wiki/Algorithm_Implementation/Strings/Levenshtein_distance

and take a reference for the implementation in different languages here: http://en.wikibooks.org/wiki/Algorithm_Implementation/Strings/Levenshtein_distance

我希望帮助,并感谢您的评论选票;)

I hope that helps and thanks for the comment up votes ;)

这篇关于寻找类似词语的话阵列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆