NAME
Lingua::AtD::Metric - Encapsulates the Metrics contained in Scores.
VERSION
version 1.112970
SYNOPSIS
use Lingua::AtD;
# Create a new service proxy
my $atd = Lingua::AtD->new( {
host => 'service.afterthedeadline.com',
port => 80,
});
# Run spelling and grammar checks. Returns a Lingua::AtD::Response object.
my $atd_response = $atd->check_document('Text to check.');
# Loop through reported document errors.
foreach my $atd_error ($atd_response->get_errors()) {
# Do something with...
print "Error string: ", $atd_error->get_string(), "\n";
}
# Run only grammar checks. Essentially the same as
# check_document(), sans spell-check.
my $atd_response = $atd->check_grammar('Text to check.');
# Loop through reported document errors.
foreach my $atd_error ($atd_response->get_errors()) {
# Do something with...
print "Error string: ", $atd_error->get_string(), "\n";
}
# Get statistics on a document. Returns a Lingua::AtD::Scores object.
my $atd_scores = $atd->stats('Text to check.');
# Loop through reported document errors.
foreach my $atd_metric ($atd_scores->get_metrics()) {
# Do something with...
print $atd_metric->get_type(), "/", $atd_metric->get_key(),
" = ", $atd_metric->get_value(), "\n";
}
DESCRIPTION
<description>
METHODS
AUTHOR
David L. Day <dday376@gmail.com>
COPYRIGHT AND LICENSE
This software is copyright (c) 2011 by David L. Day.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.