On Tue, 11 May 2010 17:48:41 +1200, Lawrence D'Oliveiro wrote:
>> I was working with regex on a very large text, really large but I have
>> time constrained.
>
> “Fast regex” is a contradiction in terms.
Not at all. A properly-written regexp engine will be limited o
Lawrence D'Oliveiro wrote:
> “Fast regex” is a contradiction in terms. You use
> regexes when you want ease of definition and
> application, not speed.
Python or Perl regex's are not actually regular expressions. Real
regular expression compilers produce blazing fast resul
Lawrence D'Oliveiro writes:
> “Fast regex” is a contradiction in terms. You use regexes when you want ease
> of definition and application, not speed.
>
> For speed, consider hand-coding your own state machine. Preferably in a
> compiled language like C.
But, nothing st
In message
,
james_027 wrote:
> I was working with regex on a very large text, really large but I have
> time constrained.
“Fast regex” is a contradiction in terms. You use regexes when you want ease
of definition and application, not speed.
For speed, consider hand-coding your own
Bryan wrote:
Tim Chase wrote:
James wrote:
[Tim had written:]
If the keys in your word_list are more than just words, then the
regexp may not find them all, and thus not replace them all. In
that case you may have to resort to my 2nd regexp which builds
the 5k branch regexp from your actual d
Tim Chase wrote:
> James wrote:
> > [Tim had written:]
> If the keys in your word_list are more than just words, then the
> regexp may not find them all, and thus not replace them all. In
> that case you may have to resort to my 2nd regexp which builds
> the 5k branch regexp from your actual dicti
On May 6, 9:44 pm, james_027 wrote:
> On May 6, 11:33 pm, John Bokma wrote:
>
> > james_027 writes:
> > > I was working with regex on a very large text, really large but I have
> > > time constrained. Does python has any other regex library or string
> > > manipulation library that works really
[your reply appears to have come only to me instead of the
mailing list; CC'ing c.l.p in reply]
On 05/06/2010 10:12 PM, James Cai wrote:
When you say "This does a replacement for every word in the input corpus
(possibly with itself), but only takes one pass through the source text. "
It sounds
On 05/06/10 16:52, james_027 wrote:
> hi,
>
> I was working with regex on a very large text, really large but I have
> time constrained. Does python has any other regex library or string
> manipulation library that works really fast?
Have a look at
http://www.egenix.com/products/python/mxBase/mx
On May 6, 11:33 pm, John Bokma wrote:
> james_027 writes:
> > I was working with regex on a very large text, really large but I have
> > time constrained. Does python has any other regex library or string
> > manipulation library that works really fast?
>
> Hard to answer without seeing your rege
On 05/06/2010 09:11 PM, james_027 wrote:
for key, value in words_list.items():
compile = re.compile(r"""\b%s\b""" % key, re.IGNORECASE)
search = compile.sub(value, content)
where the content is a large text about 500,000 characters and the
word list is about 5,000
You don't specify w
On May 6, 11:33 pm, John Bokma wrote:
> james_027 writes:
> > I was working with regex on a very large text, really large but I have
> > time constrained. Does python has any other regex library or string
> > manipulation library that works really fast?
>
> Hard to answer without seeing your rege
On May 6, 11:33 pm, John Bokma wrote:
> james_027 writes:
> > I was working with regex on a very large text, really large but I have
> > time constrained. Does python has any other regex library or string
> > manipulation library that works really fast?
>
> Hard to answer without seeing your rege
james_027 writes:
> I was working with regex on a very large text, really large but I have
> time constrained. Does python has any other regex library or string
> manipulation library that works really fast?
Hard to answer without seeing your regex and requirements first.
Your question is like:
Hello,
2010/5/6 james_027 :
> I was working with regex on a very large text, really large but I have
> time constrained. Does python has any other regex library or string
> manipulation library that works really fast?
re2 (http://code.google.com/p/re2/) is suppossed to be faster than the
standard
hi,
I was working with regex on a very large text, really large but I have
time constrained. Does python has any other regex library or string
manipulation library that works really fast?
Thanks,
James
--
http://mail.python.org/mailman/listinfo/python-list
16 matches
Mail list logo