in reply to Recognizing parts of speech
Will get you a parse diagram like:use Lingua::LinkParser; our $parser = new Lingua::LinkParser; my $sentence = $parser->create_sentence("I am tired and he is hungry." +); my @linkages = $sentence->linkages; foreach $linkage (@linkages) { print ($parser->get_diagram($linkage)); }
Now the method get_diagram is for human reading but, L::LP does let you at all that programatically. You can determine if each word is a subject, verb, adjective, ... and what it relates to.+---------------------Xp--------------------+ | +-------CC-------+ | +--Wd--+-SX-+--Pa-+ +Wdc+-Ss+--Pa--+ | | | | | | | | | | LEFT-WALL I.p am.v tired.a and he is.v hungry.a .
besides the docs for L::LP you can you at my module Acme::Yoda for examples.
grep
| Mynd you, mønk bites Kan be pretti nasti... |
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Recognizing parts of speech
by CountZero (Bishop) on May 30, 2003 at 06:54 UTC | |
by artist (Parson) on May 30, 2003 at 10:49 UTC | |
by Anonymous Monk on May 30, 2003 at 17:24 UTC | |
by chaoticset (Chaplain) on May 30, 2003 at 19:48 UTC | |
by chaoticset (Chaplain) on May 30, 2003 at 15:45 UTC |