TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Damn Cool Algorithms: Levenshtein Automata

99 点作者 mbowcock大约 14 年前

5 条评论

mattdeboard大约 14 年前
For those of you like me who tried to read this article without the proper education to understand everything at first pass, here is the definition of a couple of acronyms he used without defining first:<p>NFA = Nondeterministic Finite Automata (<a href="http://en.wikipedia.org/wiki/Nondeterministic_finite-state_machine" rel="nofollow">http://en.wikipedia.org/wiki/Nondeterministic_finite-state_m...</a>) DFA = Deterministic Finite Automata (<a href="http://en.wikipedia.org/wiki/Deterministic_finite-state_machine" rel="nofollow">http://en.wikipedia.org/wiki/Deterministic_finite-state_mach...</a>)
sk5t大约 14 年前
I wonder if this method could extend to character transposition and weight-able costs; e.g., allow "hello"/"ehllo" = distance 1, as logically this is a single typing mistake of whacking the 'h' a bit early.<p>I've used the perl String::Approx module to great effect, but it takes a lot of resources to blast through a large dictionary.
评论 #2337796 未加载
nikcub大约 14 年前
I thought for a moment that Nick is back writing blog posts, but this is from the archives.<p>If you are a developer, esp Python and AppEngine, you really should read all the archives - it is one of the best general online sources for python, appengine (and the datastore) and dev.
评论 #2336763 未加载
s-phi-nl大约 14 年前
Unfortunately, "food" is a poor example for explaining how Levenshtein Automata work in general because it has a double letter. This means that in one state, you have the "o" transition to more states than usual because it is both the next letter and the next letter after that. If you want to generalize his automaton, do the powerset construction for some other word like "news".
viggity大约 14 年前
I use levenshtein heavily for one of my products <a href="http://www.getatomiq.com" rel="nofollow">http://www.getatomiq.com</a>
评论 #2337598 未加载