You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Ron Savage <ro...@savage.net.au> on 2002/05/28 01:22:12 UTC

[OT] Re: "back-tracking"

On Tue, 28 May 2002 04:52:48 +1200 (NZST), Andrew McNaughton wrote:
[snip]
>>i'm writting a module to highlighting of Perl syntactical
>>structures, but the current code is very slow... :(
>>
>>i need some help to implementing a method of "back-tracking" or one
>>way to revising a token that has already been formatted without
>>reformatting the entire string? it's possible?

Lucas

See:
Combinatorial Algorithms
Nijenhuis and Wilf
Academic Press
0-12-519260-6 (1975)
P 240

-- 
Cheers
Ron Savage, ron@savage.net.au on 28/05/2002
http://savage.net.au/index.html



Re: [OT] Re: "back-tracking"

Posted by Matt Sergeant <ma...@sergeant.org>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tuesday 28 May 2002 12:51 am, Andrew McNaughton wrote:
> > See:
> > Combinatorial Algorithms
> > Nijenhuis and Wilf
> > Academic Press
> > 0-12-519260-6 (1975)
> > P 240
>
> I've got a different problem.  I want to auto-link phrases which appear in
> a dictionary, but I need to do some pre-processing on candidate phrases
> before checking for them in the dictionary (removing line breaks and
> punctuation, doing stemming, etc.)  If i get a match i want to put an <A>
> tag around the phrase.
>
> Seems like it shouldn't be too hard, but which ever way I go at it it
> feels like a messy kludge.  Any suggestions?  Is the book referenced above
> going to help with this one?
>
> Probably this is off topic.  Reply to me personally, and I'll forward to
> anyone who asks for it.

One of the best books for this kind of thing is "Mastering Algorithms with 
Perl". It's got some excellent sections on string matching, stemming, and the 
like. Details at http://www.oreilly.com/catalog/maperl/

- -- 
<:->get a SMart net</:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE88ykxVBc71ct6OywRAie/AKCFypNHvtr8V37FFJX5w7ipuFaw0gCg5nCZ
n3twYWvDWrseBOsuSAk2dlM=
=u9KU
-----END PGP SIGNATURE-----

Re: [OT] Re: "back-tracking"

Posted by Andrew McNaughton <an...@scoop.co.nz>.

On Tue, 28 May 2002, Ron Savage wrote:

> On Tue, 28 May 2002 04:52:48 +1200 (NZST), Andrew McNaughton wrote:
> [snip]

That's not me below, I quoted Lucas M. Saud <lu...@uol.com.br>:

> >>i'm writting a module to highlighting of Perl syntactical
> >>structures, but the current code is very slow... :(
> >>
> >>i need some help to implementing a method of "back-tracking" or one
> >>way to revising a token that has already been formatted without
> >>reformatting the entire string? it's possible?
>
> Lucas
>
> See:
> Combinatorial Algorithms
> Nijenhuis and Wilf
> Academic Press
> 0-12-519260-6 (1975)
> P 240


I've got a different problem.  I want to auto-link phrases which appear in
a dictionary, but I need to do some pre-processing on candidate phrases
before checking for them in the dictionary (removing line breaks and
punctuation, doing stemming, etc.)  If i get a match i want to put an <A>
tag around the phrase.

Seems like it shouldn't be too hard, but which ever way I go at it it
feels like a messy kludge.  Any suggestions?  Is the book referenced above
going to help with this one?

Probably this is off topic.  Reply to me personally, and I'll forward to
anyone who asks for it.

Andrew