Net::Calais - Interface to OpenCalais web service


Net-Calais documentation  | view source Contained in the Net-Calais distribution.

Index


NAME

Top

Net::Calais - Interface to OpenCalais web service

SYNOPSIS

Top

    use Net::Calais;

    my $calais = Net::Calais->new(apikey => 'akljelkjde3jlkj2i2l2');
    print $calais->enlighten($html, contentType => 'text/html');

METHODS

Top

new()
	Net::Calais->new(PARAM => ...);

Acceptable parameters:

apikey

The API key used for authentication with the service.

enlighten()
	$calais->enlighten($data, PARAM => ...);

Submits text to the OpenCalais web service.

Optional parameters:

contentType

Format of the input content (may be text/raw, text/txt/, text/html, text/xml). Unless specified, text/txt is assumed.

outputFormat

Format of the server response. Unless specified, XML/RDF is assumed.

reltagBaseURL
calculateRelevanceScore
enableMetadataType
discardMetadata
allowDistribution
allowSearch
externalID
submitter
externalMetadata

This should be a RDF representation of your additional metadata (see OpenCalais docs).

See http://opencalais.com/APIcalls#inputparameters for description of such parameters.

semanticproxy()
	$calais->semanticproxy($url, PARAM => ...);

Submits text to the SemanticProxy web service.

Optional parameters:

output

Format of the requested output (may be html, rdf or microformat).

PACKAGE VARIABLES

Top

$CALAIS_URL

By modifying the $Net::Calais::CALAIS_URL variable you can set a custom URL for REST requests. The default value is http://api.opencalais.com/enlighten/rest/. This may be useful to use the beta service which is usually located at beta.opencalais.com.

$SEMANTICPROXY_URL

By modifying the $Net::Calais::SEMANTICPROXY_URL variable you can set a custom base URL for SemanticProxy REST requests. The default value is http://service.semanticproxy.com/processurl/.

SEE ALSO

Top

http://opencalais.com/

BUGS AND FEEDBACK

Top

You are very welcome to write mail to the maintainer (aar@cpan.org) with your contributions, comments, suggestions, bug reports or complaints.

COPYRIGHT

Top

AUTHOR

Top

Alessandro Ranellucci <aar@cpan.org>


Net-Calais documentation  | view source Contained in the Net-Calais distribution.