Perspective

NAME

API::Perspective - Interface to Google's Perspective API

DESCRIPTION ...

SYNOPSIS

use API::Perspective;
my $api = API::Perspective.new(:api-key(%*ENV<PERSPECTIVE_API_KEY>));
my MODEL @models = TOXICITY, SPAM;
my $result = $api.analyze(:@models, :comment("hello my friend"));
say @models Z=> $result<attributeScores>{@models}.map: *<summaryScore><value>;

EXPORTED SYMBOLS

MODEL

MODEL is an enumeration of all known analysis models on the Perspective API.

PROPERTIES

METHODS

analyze Named Arguments: $comment, MODEL @models

Submit a $comment to the API for analysis, also specify the MODEL @models you would like to use

suggest-score Named Arguments: $comment, MODEL $model, $value

Suggests a score $value for $comment using the model $model. See /MODEL

The Camelia image is copyright 2009 by Larry Wall. "Raku" is trademark of the Yet Another Society. All rights reserved.