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... |
In reply to Re: Recognizing parts of speech
by grep
in thread Recognizing parts of speech
by justinNEE
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |