Mohammad S Anwar > WWW-Google-Diacritize > WWW::Google::Diacritize



Annotate this POD

View/Report Bugs
Module Version: 0.07   Source  


WWW::Google::Diacritize - Interface to Google Diacritize API.


Version 0.07


This module is intended for anyone who wants to write applications that can interact with the Google Diacritize API. With this, you can add diacritical marks to text in your webpages /app. The process of diacritizing is also called "Tashkeel". Just to clarify, Arabic is not my first language. However I can read it as it's written in the our holy book "Quran". I don't claim to understand the intricacies of the languge.

NOTE: The version v1 of the Google Diacritize API is in Labs, and its features might change unexpectedly until it graduates.


The constructor expects your application API, which you can get it for FREE from Google.

    use strict; use warnings;
    use WWW::Google::Diacritize;

    my $api_key = 'Your_API_Key';
    my $diacritize = WWW::Google::Diacritize->new($api_key);


set_diacritical_marks() =encoding ALREADYDONE

Sets the diacritical marks to the given text in the given language. Arabic is currently ONLY the supported language. Returns the diacritized text back.

    | Key         | Description                                   | Values     | Default |
    | lang        | Set the language.                             | ar         | N/A     |
    | message     | Text string to return with diacritical marks. |            | N/A     |
    | last_letter | Diacritize last letter.                       | true/false | true    |
    | prettyprint | Returns result in human readable format.      | true/false | false   |

    use strict; use warnings;
    use WWW::Google::Diacritize;

    my $api_key    = 'Your_API_Key';
    my $diacritize = WWW::Google::Diacritize->new($api_key);
    print $diacritize->set_diacritical_marks({lang => 'ar', prettyprint=>'true', message=>'مثال لتشكيل'});


Mohammad S Anwar, <mohammad.anwar at>


Please report any bugs or feature requests to bug-www-google-diacritize at, or through the web interface at I will be notified and then you'll automatically be notified of progress on your bug as I make changes.


You can find documentation for this module with the perldoc command.

    perldoc WWW::Google::Diacritize

You can also look for information at:


Copyright 2011 Mohammad S Anwar.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See for more information.


This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

syntax highlighting: