<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>support.levenshtein module — Whoosh 2.5.1 documentation</title> <link rel="stylesheet" href="../../_static/default.css" type="text/css" /> <link rel="stylesheet" href="../../_static/pygments.css" type="text/css" /> <script type="text/javascript"> var DOCUMENTATION_OPTIONS = { URL_ROOT: '../../', VERSION: '2.5.1', COLLAPSE_INDEX: false, FILE_SUFFIX: '.html', HAS_SOURCE: true }; </script> <script type="text/javascript" src="../../_static/jquery.js"></script> <script type="text/javascript" src="../../_static/underscore.js"></script> <script type="text/javascript" src="../../_static/doctools.js"></script> <link rel="top" title="Whoosh 2.5.1 documentation" href="../../index.html" /> <link rel="up" title="Whoosh API" href="../api.html" /> <link rel="next" title="util module" href="../util.html" /> <link rel="prev" title="support.charset module" href="charset.html" /> </head> <body> <div class="related"> <h3>Navigation</h3> <ul> <li class="right" style="margin-right: 10px"> <a href="../../genindex.html" title="General Index" accesskey="I">index</a></li> <li class="right" > <a href="../../py-modindex.html" title="Python Module Index" >modules</a> |</li> <li class="right" > <a href="../util.html" title="util module" accesskey="N">next</a> |</li> <li class="right" > <a href="charset.html" title="support.charset module" accesskey="P">previous</a> |</li> <li><a href="../../index.html">Whoosh 2.5.1 documentation</a> »</li> <li><a href="../api.html" accesskey="U">Whoosh API</a> »</li> </ul> </div> <div class="document"> <div class="documentwrapper"> <div class="bodywrapper"> <div class="body"> <div class="section" id="module-whoosh.support.levenshtein"> <span id="support-levenshtein-module"></span><h1><tt class="docutils literal"><span class="pre">support.levenshtein</span></tt> module<a class="headerlink" href="#module-whoosh.support.levenshtein" title="Permalink to this headline">¶</a></h1> <p>Contains functions implementing edit distance algorithms.</p> <dl class="function"> <dt id="whoosh.support.levenshtein.relative"> <tt class="descclassname">whoosh.support.levenshtein.</tt><tt class="descname">relative</tt><big>(</big><em>a</em>, <em>b</em><big>)</big><a class="headerlink" href="#whoosh.support.levenshtein.relative" title="Permalink to this definition">¶</a></dt> <dd><p>Returns the relative distance between two strings, in the range [0-1] where 1 means total equality.</p> </dd></dl> <dl class="function"> <dt id="whoosh.support.levenshtein.distance"> <tt class="descclassname">whoosh.support.levenshtein.</tt><tt class="descname">distance</tt><big>(</big><em>seq1</em>, <em>seq2</em>, <em>limit=None</em><big>)</big><a class="headerlink" href="#whoosh.support.levenshtein.distance" title="Permalink to this definition">¶</a></dt> <dd><p>Returns the Damerau-Levenshtein edit distance between two strings.</p> </dd></dl> </div> </div> </div> </div> <div class="sphinxsidebar"> <div class="sphinxsidebarwrapper"> <h4>Previous topic</h4> <p class="topless"><a href="charset.html" title="previous chapter"><tt class="docutils literal docutils literal docutils literal"><span class="pre">support.charset</span></tt> module</a></p> <h4>Next topic</h4> <p class="topless"><a href="../util.html" title="next chapter"><tt class="docutils literal"><span class="pre">util</span></tt> module</a></p> <h3>This Page</h3> <ul class="this-page-menu"> <li><a href="../../_sources/api/support/levenshtein.txt" rel="nofollow">Show Source</a></li> </ul> <div id="searchbox" style="display: none"> <h3>Quick search</h3> <form class="search" action="../../search.html" method="get"> <input type="text" name="q" /> <input type="submit" value="Go" /> <input type="hidden" name="check_keywords" value="yes" /> <input type="hidden" name="area" value="default" /> </form> <p class="searchtip" style="font-size: 90%"> Enter search terms or a module, class or function name. </p> </div> <script type="text/javascript">$('#searchbox').show(0);</script> </div> </div> <div class="clearer"></div> </div> <div class="related"> <h3>Navigation</h3> <ul> <li class="right" style="margin-right: 10px"> <a href="../../genindex.html" title="General Index" >index</a></li> <li class="right" > <a href="../../py-modindex.html" title="Python Module Index" >modules</a> |</li> <li class="right" > <a href="../util.html" title="util module" >next</a> |</li> <li class="right" > <a href="charset.html" title="support.charset module" >previous</a> |</li> <li><a href="../../index.html">Whoosh 2.5.1 documentation</a> »</li> <li><a href="../api.html" >Whoosh API</a> »</li> </ul> </div> <div class="footer"> © Copyright 2007-2012 Matt Chaput. Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3. </div> </body> </html>