Lingua::Verbnet -- extract stats from verbnet xml files
use Lingua::Verbnet; my @verbnet_xml_files = ... ; my $verbnet = Lingua::Verbnet->new(@verbnet_xml_files); $verbnet->ambiguity->score('cut'); # get the ambiguity score of the verb 'cut' my %stats = $verbnet->ambiguity->hash; # get the full ambiguity scores hash (verb => score)
Potentially, collect and query various aspects of data from the verbnet XML files. Currently, supports just the ambiguity stats extraction.
Constructor, arguments include the list of the source files to contain the verbnet XML data. If no arguments given, assumes reading from the STDIN.
Return an Lingua::Verbnet::Ambiguity object for querying the verb ambiguity stats.
Published mainly for the purpose of demonstrating the concise way of using the Subs style of XML::Parser together with closures, which is inspired by DSSSL (thanks, James Clark!) and SGMLSpm script "sgmlspl.pl" by David Megginson (thanks, and blue skies!). Thanks also to Yuval Kogman for his persistent insistence that the above is a good enough reason to publish this on CPAN. Thanks to Dr. Michael Elhadad who asked me to do the cross-evaluation of two probabilistic parsers at http://www.cs.bgu.ac.il/~nlpproj/parse-eval/ , where this code originated.
verbstat(1), difficult(1), Lingua::Verbnet::Ambiguity, VerbNet at http://verbs.colorado.edu/verb-index/index.php
Vassilii Khachaturov <vassilii@tarunz.org>
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
See http://www.perl.com/perl/misc/Artistic.html
To install Lingua::Verbnet, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Lingua::Verbnet
CPAN shell
perl -MCPAN -e shell install Lingua::Verbnet
For more information on module installation, please visit the detailed CPAN module installation guide.