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.
Vassilii Khachaturov <firstname.lastname@example.org>
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.