This file is indexed.

/usr/share/doc/python-jellyfish-doc/html/comparison.html is in python-jellyfish-doc 0.5.6-3build2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
<!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>String Comparison &#8212; jellyfish 0.5.6 documentation</title>
    
    <link rel="stylesheet" href="_static/classic.css" type="text/css" />
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    './',
        VERSION:     '0.5.6',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true,
        SOURCELINK_SUFFIX: '.txt'
      };
    </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="index" title="Index" href="genindex.html" />
    <link rel="search" title="Search" href="search.html" />
    <link rel="next" title="Changelog" href="changelog.html" />
    <link rel="prev" title="Stemming" href="stemming.html" /> 
  </head>
  <body role="document">
    <div class="related" role="navigation" aria-label="related navigation">
      <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="changelog.html" title="Changelog"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="stemming.html" title="Stemming"
             accesskey="P">previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="index.html">jellyfish 0.5.6 documentation</a> &#187;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <div class="section" id="string-comparison">
<h1>String Comparison<a class="headerlink" href="#string-comparison" title="Permalink to this headline"></a></h1>
<p>These methods are all measures of the difference (aka <cite>edit distance</cite>) between two strings.</p>
<div class="section" id="levenshtein-distance">
<h2>Levenshtein Distance<a class="headerlink" href="#levenshtein-distance" title="Permalink to this headline"></a></h2>
<dl class="function">
<dt id="levenshtein_distance">
<code class="descname">levenshtein_distance</code><span class="sig-paren">(</span><em>s1</em>, <em>s2</em><span class="sig-paren">)</span><a class="headerlink" href="#levenshtein_distance" title="Permalink to this definition"></a></dt>
<dd><p>Compute the Levenshtein distance between s1 and s2.</p>
</dd></dl>

<p>Levenshtein distance represents the number of insertions, deletions, and subsititutions required to change one word to another.</p>
<p>For example: <code class="docutils literal"><span class="pre">levenshtein_distance('berne',</span> <span class="pre">'born')</span> <span class="pre">==</span> <span class="pre">2</span></code> representing the transformation of the first e to o and the deletion of the second e.</p>
<p>See the <a class="reference external" href="http://en.wikipedia.org/wiki/Levenshtein_distance">Levenshtein distance article at Wikipedia</a> for more details.</p>
</div>
<div class="section" id="damerau-levenshtein-distance">
<h2>Damerau-Levenshtein Distance<a class="headerlink" href="#damerau-levenshtein-distance" title="Permalink to this headline"></a></h2>
<dl class="function">
<dt id="damerau_levenshtein_distance">
<code class="descname">damerau_levenshtein_distance</code><span class="sig-paren">(</span><em>s1</em>, <em>s2</em><span class="sig-paren">)</span><a class="headerlink" href="#damerau_levenshtein_distance" title="Permalink to this definition"></a></dt>
<dd><p>Compute the Damerau-Levenshtein distance between s1 and s2.</p>
</dd></dl>

<p>A modification of Levenshtein distance, Damerau-Levenshtein distance counts transpositions (such as ifhs for fish) as a single edit.</p>
<p>Where <code class="docutils literal"><span class="pre">levenshtein_distance('fish',</span> <span class="pre">'ifsh')</span> <span class="pre">==</span> <span class="pre">2</span></code> as it would require a deletion and an insertion,
though <code class="docutils literal"><span class="pre">damerau_levenshtein_distance('fish',</span> <span class="pre">'ifsh')</span> <span class="pre">==</span> <span class="pre">1</span></code> as this counts as a transposition.</p>
<p>See the <a class="reference external" href="http://en.wikipedia.org/wiki/Damerau-Levenshtein_distance">Damerau-Levenshtein distance article at Wikipedia</a> for more details.</p>
</div>
<div class="section" id="hamming-distance">
<h2>Hamming Distance<a class="headerlink" href="#hamming-distance" title="Permalink to this headline"></a></h2>
<dl class="function">
<dt id="hamming_distance">
<code class="descname">hamming_distance</code><span class="sig-paren">(</span><em>s1</em>, <em>s2</em><span class="sig-paren">)</span><a class="headerlink" href="#hamming_distance" title="Permalink to this definition"></a></dt>
<dd><p>Compute the Hamming distance between s1 and s2.</p>
</dd></dl>

<p>Hamming distance is the measure of the number of characters that differ between two strings.</p>
<p>Typically Hamming distance is undefined when strings are of different length, but this implementation
considers extra characters as differing.  For example <code class="docutils literal"><span class="pre">hamming_distance('abc',</span> <span class="pre">'abcd')</span> <span class="pre">==</span> <span class="pre">1</span></code>.</p>
<p>See the <a class="reference external" href="http://en.wikipedia.org/wiki/Hamming_distance">Hamming distance article at Wikipedia</a> for more details.</p>
</div>
<div class="section" id="jaro-distance">
<h2>Jaro Distance<a class="headerlink" href="#jaro-distance" title="Permalink to this headline"></a></h2>
<dl class="function">
<dt id="jaro_distance">
<code class="descname">jaro_distance</code><span class="sig-paren">(</span><em>s1</em>, <em>s2</em><span class="sig-paren">)</span><a class="headerlink" href="#jaro_distance" title="Permalink to this definition"></a></dt>
<dd><p>Compute the Jaro distance between s1 and s2.</p>
</dd></dl>

<p>Jaro distance is a string-edit distance that gives a floating point response in [0,1] where 0 represents two completely dissimilar strings and 1 represents identical strings.</p>
</div>
<div class="section" id="jaro-winkler-distance">
<h2>Jaro-Winkler Distance<a class="headerlink" href="#jaro-winkler-distance" title="Permalink to this headline"></a></h2>
<dl class="function">
<dt id="jaro_winkler">
<code class="descname">jaro_winkler</code><span class="sig-paren">(</span><em>s1</em>, <em>s2</em><span class="sig-paren">)</span><a class="headerlink" href="#jaro_winkler" title="Permalink to this definition"></a></dt>
<dd><p>Compute the Jaro-Winkler distance between s1 and s2.</p>
</dd></dl>

<p>Jaro-Winkler is a modification/improvement to Jaro distance, like Jaro it gives a floating point response in [0,1] where 0 represents two completely dissimilar strings and 1 represents identical strings.</p>
<p>See the <a class="reference external" href="http://en.wikipedia.org/wiki/Jaro-Winkler_distance">Jaro-Winkler distance article at Wikipedia</a> for more details.</p>
</div>
<div class="section" id="match-rating-approach-comparison">
<h2>Match Rating Approach (comparison)<a class="headerlink" href="#match-rating-approach-comparison" title="Permalink to this headline"></a></h2>
<dl class="function">
<dt id="match_rating_comparison">
<code class="descname">match_rating_comparison</code><span class="sig-paren">(</span><em>s1</em>, <em>s2</em><span class="sig-paren">)</span><a class="headerlink" href="#match_rating_comparison" title="Permalink to this definition"></a></dt>
<dd><p>Compare s1 and s2 using the match rating approach algorithm, returns <code class="docutils literal"><span class="pre">True</span></code> if strings are considered equivalent or <code class="docutils literal"><span class="pre">False</span></code> if not.  Can also return <code class="docutils literal"><span class="pre">None</span></code> if s1 and s2 are not comparable (length differs by more than 3).</p>
</dd></dl>

<p>The Match rating approach algorithm is an algorithm for determining whether or not two names are
pronounced similarly.  Strings are first encoded using <a class="reference internal" href="phonetic.html#match_rating_codex" title="match_rating_codex"><code class="xref py py-func docutils literal"><span class="pre">match_rating_codex()</span></code></a> then compared according to the MRA algorithm.</p>
<p>See the <a class="reference external" href="http://en.wikipedia.org/wiki/Match_rating_approach">Match Rating Approach article at Wikipedia</a> for more details.</p>
</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
  <h3><a href="index.html">Table Of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">String Comparison</a><ul>
<li><a class="reference internal" href="#levenshtein-distance">Levenshtein Distance</a></li>
<li><a class="reference internal" href="#damerau-levenshtein-distance">Damerau-Levenshtein Distance</a></li>
<li><a class="reference internal" href="#hamming-distance">Hamming Distance</a></li>
<li><a class="reference internal" href="#jaro-distance">Jaro Distance</a></li>
<li><a class="reference internal" href="#jaro-winkler-distance">Jaro-Winkler Distance</a></li>
<li><a class="reference internal" href="#match-rating-approach-comparison">Match Rating Approach (comparison)</a></li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="stemming.html"
                        title="previous chapter">Stemming</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="changelog.html"
                        title="next chapter">Changelog</a></p>
  <div role="note" aria-label="source link">
    <h3>This Page</h3>
    <ul class="this-page-menu">
      <li><a href="_sources/comparison.rst.txt"
            rel="nofollow">Show Source</a></li>
    </ul>
   </div>
<div id="searchbox" style="display: none" role="search">
  <h3>Quick search</h3>
    <form class="search" action="search.html" method="get">
      <div><input type="text" name="q" /></div>
      <div><input type="submit" value="Go" /></div>
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related" role="navigation" aria-label="related navigation">
      <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="changelog.html" title="Changelog"
             >next</a> |</li>
        <li class="right" >
          <a href="stemming.html" title="Stemming"
             >previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="index.html">jellyfish 0.5.6 documentation</a> &#187;</li> 
      </ul>
    </div>
    <div class="footer" role="contentinfo">
        &#169; Copyright 2017, James Turk.
      Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.5.6.
    </div>
  </body>
</html>