On Wed, 2010-11-17 at 21:12 -0800, Sorin Schwimmer wrote:
> Thanks for your answers.
>
> Benjamin Kaplan: of course dict is a type... silly me! I'll blame it on the
> time (it's midnight here).
>
> Chris Rebert: I'll have a look.
>
> Thank you both,
> SxN
>
>
Forgive me if this is off the tr
On 2:59 PM, Sorin Schwimmer wrote:
Steven D'Aprano: the original file is 139MB (that's the typical size for it).
Eliminating diacritics is just a little toping on the cake; the processing is
something else.
Thanks anyway for your suggestion,
SxN
PS Perhaps I should have mention that I'm on Py
On 18/11/2010 04:30, Benjamin Kaplan wrote:
On Wed, Nov 17, 2010 at 11:21 PM, Sorin Schwimmer wrote:
Hi All,
I have to eliminate diacritics in a fairly large file.
Inspired by http://code.activestate.com/recipes/81330/, I came up with the
following code:
#! /usr/bin/env python
import re
n
Sorin Schwimmer wrote:
> I have to eliminate diacritics in a fairly large file.
>
> Inspired by http://code.activestate.com/recipes/81330/, I came up with the
> following code:
Here's the unicode.translate()-based approach spelt out:
http://effbot.org/zone/unicode-convert.htm
Peter
--
http://
Steven D'Aprano: the original file is 139MB (that's the typical size for it).
Eliminating diacritics is just a little toping on the cake; the processing is
something else.
Thanks anyway for your suggestion,
SxN
PS Perhaps I should have mention that I'm on Python 2.7
--
http://mail.python.org
Thanks for your answers.
Benjamin Kaplan: of course dict is a type... silly me! I'll blame it on the
time (it's midnight here).
Chris Rebert: I'll have a look.
Thank you both,
SxN
--
http://mail.python.org/mailman/listinfo/python-list
On Wed, 17 Nov 2010 20:21:06 -0800, Sorin Schwimmer wrote:
> Hi All,
>
> I have to eliminate diacritics in a fairly large file.
What's "fairly large"? Large to you is probably not large to your
computer. Anything less than a few dozen megabytes is small enough to be
read entirely into memory.
On Wed, Nov 17, 2010 at 8:21 PM, Sorin Schwimmer wrote:
> Hi All,
>
> I have to eliminate diacritics in a fairly large file.
>
> Inspired by http://code.activestate.com/recipes/81330/, I came up with the
> following code:
>
> #! /usr/bin/env python
>
> import re
>
> nodia={chr(196)+chr(130):'A',
On Wed, Nov 17, 2010 at 11:21 PM, Sorin Schwimmer wrote:
> Hi All,
>
> I have to eliminate diacritics in a fairly large file.
>
> Inspired by http://code.activestate.com/recipes/81330/, I came up with the
> following code:
>
> #! /usr/bin/env python
>
> import re
>
> nodia={chr(196)+chr(130):'A',
Hi All,
I have to eliminate diacritics in a fairly large file.
Inspired by http://code.activestate.com/recipes/81330/, I came up with the
following code:
#! /usr/bin/env python
import re
nodia={chr(196)+chr(130):'A', # mamaliga
chr(195)+chr(130):'A', # A^
chr(195)+chr(142):'I',
10 matches
Mail list logo