Click here to get back home

how detect english subject and predicate in a sentence

 HomeNewsGroups | Search

get this group's latest topics as an RSS feed  comp.lang.perl.misc - PERL programming language

Subject Author Date
how detect english subject and predicate in a sentence Jack 12-04-2008
If you were  Registered and logged in, you could reply and use other advanced thread options
Posted by Jack on December 4, 2008, 12:49 am
Hi there, just checking to see if anyone knows how to perform this
basic grammar function ?  I searched CPAN and found nothing that was
able to in Perl..

Thank you,

Jack

Posted by Charlton Wilbur on December 4, 2008, 12:55 am



That's because it's not a trivial problem.

Consider: "Time flies like an arrow.  Fruit flies like a banana."

In the second sentence, what is the subject?

Charlton


--
Charlton Wilbur
cwilbur@chromatico.net

Posted by Jack on December 4, 2008, 1:07 am


Thanks.. So my goal would be to capture what is the subject of the
sentence, Time, and Fruit, respectively.  However you cant always take
the first noun that shows up as the subject for instance: "Despite
accusations, lawyers find a way to evade difficult situations"

Lawyers would be the subject of the sentence.. does that make sense ?
Essentially, identify the TOPIC/subject is what I want to do, for a
given sentence..


Posted by Jürgen Exner on December 4, 2008, 2:07 am


You just proved Charlton's point:  
In the second sentence the subject is not "fruit" but "fruit flies"

Natural language parsing is a _very_ difficult subject.

jue

Posted by Charlton Wilbur on December 4, 2008, 9:58 am






And you just proved my actual point:  Whether the subject is "fruit" or
"fruit flies" is indeterminate, and that's where the humor in the
statement comes from.

Charlton




--
Charlton Wilbur
cwilbur@chromatico.net

If you were  Registered and logged in, you could reply and use other advanced thread options

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Driving a better car - Fuelzilla.com

Cabling site for homeowners and pros alike - Cabling-Design.com

1-Script XML SitemapXML Sitemap
Privacy Policy