Ham::Reference::Phonetics - A quick reference for the ITU Phonetic Alphabet.
Version 0.02
use Ham::Reference::Phonetics; my $phonetics = Ham::Reference::Phonetics->new( space => '<space>' ); # use the get() function to get a string of phonetics print $phonetics->get('abc xyz'); print "\n"; # use the get_array() function to get an array of phonetics # with each one in an element my $arrayref = $phonetics->get_arrayref('abc xyz'); foreach (@$arrayref) { print "$_\n"; } # use a hash reference to get all phonetics # the following will display all letters and corresponding phonetics my $hashref = $phonetics->get_hashref(); foreach (sort keys %$hashref) { print "$_ = $hashref->{$_}\n"; }
The Ham::Reference::Phonetics module is a quick reference to the ITU phonetic alphabet suggested by the ARRL for Amateur Radio use. Other phonetic alphabets may be included in the future. Some can already be found in Lingua::Alphabet::Phonetic.
Ham::Reference::Phonetics
Lingua::Alphabet::Phonetic
Usage : my $phonetics = Ham::Reference::Phonetics->new(); Function : creates a new Ham::Reference::Phonetics object Returns : A Ham::Reference::Phonetics object Args : an anonymous hash: key required? value ------- --------- ----- phonetic_set no select the phonetic alphabet set the only set for now, and the default set is itu space no set a string to represent a space when using methods to convert to phonetics default is an empty string
Usage : my $string = $phonetics->get( 'this is my string' ); Function : converts a string to a string of corresponding phonetic words Returns : a string Args : a string
Usage : my $arrayref = $phonetics->get_arrayref( 'this is my string' ); Function : converts a string to an array reference of corresponding phonetic words one phonetic word per element Returns : an array reference Args : a string
Usage : my $hashref = $phonetics->get_hashref(); Function : get the phonetic alphabet in a hash referenece Returns : a hash reference Args : n/a
The ITU phonetic alphabet for Amateur Radio use was taken from http://www.arrl.org/FandES/field/forms/fsd220.html#alphabet, courtesy of the American Radio Relay League.
Other phonetic alphabets can found in Lingua::Alphabet::Phonetic.
Brad McConahay N8QQ, <brad at n8qq.com>
<brad at n8qq.com>
Ham::Reference::Phonetics is Copyright (C) 2008-2010 Brad McConahay N8QQ.
This module is free software; you can redistribute it and/or modify it under the terms of the Artistic License 2.0. For details, see the full text of the license in the file LICENSE.
This program is distributed in the hope that it will be useful, but it is provided "as is" and without any express or implied warranties. For details, see the full text of the license in the file LICENSE.
To install Ham::Reference::Phonetics, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Ham::Reference::Phonetics
CPAN shell
perl -MCPAN -e shell install Ham::Reference::Phonetics
For more information on module installation, please visit the detailed CPAN module installation guide.