Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Ancient Tagger?

by dsheroh (Monsignor)
on Nov 06, 2007 at 21:22 UTC ( [id://649346]=perlquestion: print w/replies, xml ) Need Help??

dsheroh has asked for the wisdom of the Perl Monks concerning the following question:

I'm currently working on a project for which it appears that Lingua::EN::Tagger would be quite useful. Unfortunately, this will have to run on a server which is still using perl 5.6.1, which appears to be incompatible with this module, instead complaining
Unrecognized escape \p in character class passed through before HERE m +ark in regex m/(?<![\p << HERE {IsWord}\s'])'(?=.*\p{IsWord})/ at Lin +gua/EN/Tagger.pm line XXX
for several different values of XXX. CPAN only shows two versions of this module, both dated 2005 and only a couple months apart.

Does anyone know of a module which provides similar functionality (i.e., extracting noun phrases from text) and will work on 5.6.1?

Replies are listed 'Best First'.
Re: Ancient Tagger?
by Corion (Patriarch) on Nov 06, 2007 at 22:01 UTC

    If you're searching for old versions of modules, http://backpan.cpan.org keeps everything that once was on CPAN. perlre tells me that \p{PROP} is a fancy name for a character class, and I guess that \p{IsWord} is identical to \w, so you could try to patch the module to use \w wherever \p{IsWord} is used and then see whether the tests still pass. Maybe \p{IsWord} only means [a-z] plus all those diacritics, but English won't have them, so maybe you're lucky.

Re: Ancient Tagger?
by diotalevi (Canon) on Nov 07, 2007 at 02:38 UTC

    You're writing new software so you can get a new version of perl. If you install it to some place like /opt/perl-5.8.8 or similar then you won't ever conflict with /usr/bin/perl. This general strategy lets you have many perls so your legacy code won't break by changing your perl underneath it and your new code and can use recent perls.

    ⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://649346]
Approved by Sidhekin
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2024-04-19 02:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found