How to pass variable to double metaphone function
<p>I've downloaded the double metaphone function: <a href="https://github.com/dracos/double-metaphone" rel="nofollow">https://github.com/dracos/double-metaphone</a></p>

<p>It' supposed to work like this: </p>

<pre><code>&gt;&gt;&gt; dm(u'aubrey')
('APR', '')
&gt;&gt;&gt; dm(u'richard')
('RXRT', 'RKRT')
&gt;&gt;&gt; dm(u'katherine') == dm(u'catherine')
True
</code></pre>

<p>How do I pass a variable to this function? The u is always in the way. I need to be able to do</p>

<pre><code>dm(x)==dm(y)
</code></pre>

<p>right now this is what happens:</p>

<pre><code>&gt;&gt;&gt; x='wal mart'
&gt;&gt;&gt; y='wall mart'
&gt;&gt;&gt; dm(x)==dm(y)
Traceback (most recent call last):
File "&lt;pyshell#35&gt;", line 1, in &lt;module&gt;
dm(x)==dm(y)
File "&lt;pyshell#18&gt;", line 6, in dm
st = ''.join((c for c in unicodedata.normalize('NFD', st) if unicodedata.category(c) != 'Mn'))
TypeError: normalize() argument 2 must be unicode, not str
</code></pre>
