<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to bugs</title><link>https://sourceforge.net/p/python-ngram/bugs/</link><description>Recent changes to bugs</description><atom:link href="https://sourceforge.net/p/python-ngram/bugs/feed.rss" rel="self"/><language>en</language><lastBuildDate>Thu, 11 Jun 2009 14:46:11 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/python-ngram/bugs/feed.rss" rel="self" type="application/rss+xml"/><item><title>Implement Python 3.0 compliance</title><link>https://sourceforge.net/p/python-ngram/bugs/4/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;This module should become Python 3.0 compliant.  I patch was submitted to the patches category.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Thu, 11 Jun 2009 14:46:11 -0000</pubDate><guid>https://sourceforge.netd20dd275e8c3817e8d56c632caea888d61444f5c</guid></item><item><title>Character encoding trouble</title><link>https://sourceforge.net/p/python-ngram/bugs/3/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;If supplying a multibyte string as either "haystack" or "needle", results are unpredictable:&lt;/p&gt;
&lt;p&gt;&amp;gt;&amp;gt;&amp;gt; ngram.compare('dfsédfsdf', 'dfsédfsdf')&lt;br /&gt;
XXd: 'XXd'&lt;br /&gt;
Xdf: 'Xdf'&lt;br /&gt;
dfs: 'dfs'&lt;br /&gt;
fs�: 'fs\xc3'&lt;br /&gt;
sé: 's\xc3\xa9'&lt;br /&gt;
éd: '\xc3\xa9d'&lt;br /&gt;
�df: '\xa9df'&lt;br /&gt;
dfs: 'dfs'&lt;br /&gt;
fsd: 'fsd'&lt;br /&gt;
sdf: 'sdf'&lt;br /&gt;
dfX: 'dfX'&lt;br /&gt;
fXX: 'fXX'&lt;br /&gt;
1.0&lt;/p&gt;
&lt;p&gt;Note that the trigrams in the middle are not trigrams at all, but di-grams because the multibyte character is recognized as two characters. Essentially, in this case, as everything get's treated the same, the end-result is correct. However, when supplying the ctrings as unicode objects, it all works as expected:&lt;/p&gt;
&lt;p&gt;&amp;gt;&amp;gt;&amp;gt; ngram.compare(u'dfsédfsdf', u'dfsédfsdf')&lt;br /&gt;
XXd: u'XXd'&lt;br /&gt;
Xdf: u'Xdf'&lt;br /&gt;
dfs: u'dfs'&lt;br /&gt;
fsé: u'fs\xe9'&lt;br /&gt;
séd: u's\xe9d'&lt;br /&gt;
édf: u'\xe9df'&lt;br /&gt;
dfs: u'dfs'&lt;br /&gt;
fsd: u'fsd'&lt;br /&gt;
sdf: u'sdf'&lt;br /&gt;
dfX: u'dfX'&lt;br /&gt;
fXX: u'fXX'&lt;br /&gt;
1.0&lt;/p&gt;
&lt;p&gt;For this reason, I will add a type-check that will only allow unicode objects to be passed down into the module. This may also reveal possible encoding trouble, beacuse the unicode conversion will most likely fail in that case. So the module will not accept data that is obviously wrong.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Michel Albert</dc:creator><pubDate>Wed, 21 Nov 2007 14:43:05 -0000</pubDate><guid>https://sourceforge.netaf9c4d514cd4ccfeb7dd0f9dc06ce7b0ed6d8972</guid></item><item><title>Wrong results due to padding with "X"</title><link>https://sourceforge.net/p/python-ngram/bugs/2/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Internally the algorithm pads the supplied strings with "X" characters. This causes problems when the string itself begins or ends with an X. The similarity score will be smaller than expected as one trigram "disappears".&lt;/p&gt;
&lt;p&gt;A solution is in the works ;)&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Michel Albert</dc:creator><pubDate>Wed, 21 Nov 2007 14:11:16 -0000</pubDate><guid>https://sourceforge.net41447c70cef250ea5c9ce528cf91ff66a4123e9b</guid></item><item><title>Sources not available</title><link>https://sourceforge.net/p/python-ngram/bugs/1/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;The source package is empty!&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Tue, 04 Jul 2006 20:53:33 -0000</pubDate><guid>https://sourceforge.net76d309fe8caedec3ba558132937aa357064fb7e1</guid></item></channel></rss>