IntroductionTagyu is a service that can suggest you tags relevant to your content. They have a REST interface available so I quickly rolled up a simple Perl wrapper over it.
Simple to useUsing Tagyu Web Service from Perl is now very simple and all you need to do is:
my @tags = Tagyu::Search->SuggestTags("[PUT YOUR TEXT HERE]");
SuggestTags method returns an array of strings containing the tags received from Tagyu for the specified text using its REST API.
Passing optionsYou can also specify options to the
SuggestTagsmethod of Tagyu::Search module as key-value pairs to modify its behavior when it dispatches requests to the Tagyu.com servers. Here's an example that sets the timeout parameter.
my @tags = Tagyu::Search->SuggestTags("[PUT YOUR TEXT HERE]",Tagyu::Search uses LWP::UserAgent behind the scenes. So for details of all supported options and their default values, please check the documentation of LWP::UserAgent's constructor.
(timeout => 600)
Supports HTTP Basic AuthenticationTagyu imposes a limit of one request per minute from a single IP address and requests beyond this limit result in an error. However registered users have a soft cap of 1000 requests per day. Tagyu::Search package allows you to pass your username/password to Tagyu in the following manner:
You can register at Tagyu here.
# Instantiate a new Tagyu::Search object.
my $tagyu = Tagyu::Search->new(
username => "[YOUR-USERNAME]",
password => "[YOUR-PASSWORD]"
# Invoke the SuggestTags method on the Tagyu::Search object.
my @tags = $tagyu->SuggestTags("[YOUR-TEXT]");