Re: [code-review] Lingua::EN::NamedEntity

JS Bangs <[email protected]> Fri, 26 Sep 2003 15:00:56 -0700 (PDT)
Newsgroups gmane.comp.lang.perl.code-review-ladder
Message-ID <[email protected]>
Simon Cozens sikyal:

> So after setting this list up because I was tired of releasing modules to CPAN
> without proper peer review, what did I just go and do? Blegh. Please take a
> look at
> http://search.cpan.org/src/SIMON/Lingua-EN-NamedEntity-1.0/NamedEntity.pm
>
> There's a few interesting problems in there, such as a crazy mix of OO and
> non-OO code. Any comments would be appreciated. (Don't bother commenting on
> the actual algorithm, since it's a bag of sh^W^W^W^Wan approximate heuristic)

I don't mind the crazy mix of OO and non-OO stuff. It's kind of cute. The
rest of this is nitpicks:

Others have mentioned the stuff about DB_File.

The hash references returned from extract_entities are actually blessed
into Lingua::EN::NamedEntity. This should be noted somewhere in the
documentation. While you're at it, you might want to document the OO part
of the interface for those that would like to play with and/or extend the
module.

: my $abbr = qr/$people_initial|$people_terminal|$places_initial|St/;

I don't think you need the 'St' at the end of the match, because
$places_initial also includes 'St'.

I'm curious to see how this performs in the wild... have you tried it out
much?

--
Jesse S. Bangs [email protected]
http://students.washington.edu/jaspax/
http://students.washington.edu/jaspax/blog

Jesus asked them, "Who do you say that I am?"

And they answered, "You are the eschatological manifestation of the ground
of our being, the kerygma in which we find the ultimate meaning of our
interpersonal relationship."

And Jesus said, "What?"