
Ham::Reference::Phonetics - A quick reference for the ITU Phonetic Alphabet.

Version 0.01

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.

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>

Copyright 2008 Brad McConahay N8QQ, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.