Getting incorrect score from fuzzy wuzzy partial_ratio
<p>I am fairly new to Python and I am trying to use fuzzy wuzzy for fuzzy matching. I believe I am getting incorrect scores for matches using the partial_ratio function. Here is my exploratory code:</p>

<pre><code>&gt;&gt;&gt;from fuzzywuzzy import fuzz
&gt;&gt;&gt;fuzz.partial_ratio('Subject: Dalki Manganese Ore Mine of M/S Bharat Process and Mechanical Engineers Ltd., Villages Dalki, Soyabahal, Sading and Thakurani R.F., Tehsil Barbil, Distt, Keonjhar, Orissa environmental clearance','Barbil')
50
</code></pre>

<p>I believe this should return a score of 100, since the second string, 'Barbil', is contained in the first string. When I try taking off a few characters at the end or beginning of the first string, I get a matching score of 100. </p>

<pre><code>&gt;&gt;&gt;fuzz.partial_ratio('Subject: Dalki Manganese Ore Mine of M/S Bharat Process and Mechanical Engineers Ltd., Villages Dalki, Soyabahal, Sading and Thakurani R.F., Tehsil Barbil, Distt, Keonjhar, Orissa environmental clear','Barbil')
100
&gt;&gt;&gt; fuzz.partial_ratio('ect: Dalki Manganese Ore Mine of M/S Bharat Process and Mechanical Engineers Ltd., Villages Dalki, Soyabahal, Sading and Thakurani R.F., Tehsil Barbil, Distt, Keonjhar, Orissa environmental clearance','Orissa')
100
</code></pre>

<p>It seems to switch from a score of 50 to a score of 100 when the length of the first string goes to 199. Does anyone have insight as to what might be happening?</p>