I'm very impressed with python's wordlist script for plain text. Is there a
script for finding words that do NOT have certain diacritic marks, like acute
or grave accents (utf-8), over the vowels?
Thank you.
--
http://mail.python.org/mailman/listinfo/python-list
On 10/17/2012 10:31 AM, nwaits wrote:
I'm very impressed with python's wordlist script for plain text. Is there a
script for finding words that do NOT have certain diacritic marks, like acute
or grave accents (utf-8), over the vowels?
Thank you.
if you can construct a list of illegal
Le mercredi 17 octobre 2012 17:00:46 UTC+2, Dave Angel a écrit :
On 10/17/2012 10:31 AM, nwaits wrote:
I'm very impressed with python's wordlist script for plain text. Is there
a script for finding words that do NOT have certain diacritic marks, like
acute or grave accents (utf-8),
On Wed, Oct 17, 2012 at 9:32 AM, wxjmfa...@gmail.com wrote:
import unicodedata
def HasDiacritics(w):
... w_decomposed = unicodedata.normalize('NFKD', w)
... return 'no' if len(w) == len(w_decomposed) else 'yes'
...
HasDiacritics('éléphant')
'yes'
HasDiacritics('elephant')
'no'
On Wed, Oct 17, 2012 at 1:07 PM, Ian Kelly ian.g.ke...@gmail.com wrote:
return len(w) != len(w_decomposed) is all you need.
Thanks for helping, but I already knew that.
--
http://mail.python.org/mailman/listinfo/python-list
Le mercredi 17 octobre 2012 19:07:43 UTC+2, Ian a écrit :
On Wed, Oct 17, 2012 at 9:32 AM, wxjmfa...@gmail.com wrote:
import unicodedata
def HasDiacritics(w):
... w_decomposed = unicodedata.normalize('NFKD', w)
... return 'no' if len(w) == len(w_decomposed) else 'yes'
On Thu, Oct 18, 2012 at 5:17 AM, wxjmfa...@gmail.com wrote:
Not at all, I knew this. In this I decided to program like
this.
Do you get it? Yes/No or True/False
Yes but why? When you're returning a boolean concept, why not return a
boolean value? You don't even use values with one that
On Wed, Oct 17, 2012 at 12:17 PM, wxjmfa...@gmail.com wrote:
Not at all, I knew this. In this I decided to program like
this.
Do you get it? Yes/No or True/False
It's just bad style, because both 'yes' and 'no' evaluate true.
if HasDiacritics('éléphant'):
print('Correct!')
if
Le mercredi 17 octobre 2012 20:28:21 UTC+2, Ian a écrit :
On Wed, Oct 17, 2012 at 12:17 PM, wxjmfa...@gmail.com wrote:
Not at all, I knew this. In this I decided to program like
this.
Do you get it? Yes/No or True/False
It's just bad style, because both 'yes' and 'no'
On Wed, 17 Oct 2012 13:16:43 -0400, David Robinow wrote:
On Wed, Oct 17, 2012 at 1:07 PM, Ian Kelly ian.g.ke...@gmail.com
wrote:
return len(w) != len(w_decomposed) is all you need.
Thanks for helping, but I already knew that.
David, Ian was directly responding to wxjmfa...@gmail.com, whose
10 matches
Mail list logo