<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">NAME

Lingua::EN::AddressParse - routines for manipulating geographical addresses

SYNOPSIS

   use Lingua::EN::AddressParse;

   my %args =
   (
      country     =&gt; 'Australia',
      auto_clean  =&gt; 1,
      force_case  =&gt; 1,
      abbreviate_subcountry =&gt; 0,
      abbreviated_subcountry_only =&gt; 1
   );

   my $address = new Lingua::EN::AddressParse(%args);
   $error = $address-&gt;parse(
       "UNIT 2A 14-16 OLD SOUTH HEAD ST ST JOHNS WOOD NSW 2021 AUSTRALIA : HOLD MAIL");

   %my_address = $address-&gt;components;
   print $my_address{sub_property_identifier}; # UNIT 2A
   print $my_address{property_identifier};     # 14-16

   print $my_address{suburb};                  # ST JOHNS WOOD

   %my_formatted_address = $address-&gt;case_components;
   print $my_formatted_address{street};        # Old South Head
   print $my_formatted_address{street_type};   # St

   %address_properties = $address-&gt;properties;
   print $address_properties{type};            # suburban
   print $address_properties{non_matching};    # : HOLD MAIL

   $correct_casing = $address-&gt;case_all;


DESCRIPTION

This module takes as input a suburban, rural or postal address in free format
text such as,

    2A LOW ST KEW NSW 2123
    12/3-5 AUBREY ST MOUNT VICTORIA VICTORIA 3133
    "OLD REGRET" WENTWORTH FALLS NSW 2782 AUSTRALIA
    GPO Box K318, HAYMARKET, NSW 2000

    12 1st Avenue N Suite # 2 Somewhere, CA 12345 USA

and attempts to parse it. If successful, the address is broken
down into it's components and useful functions can be performed such as :

   converting upper or lower case values to title case (2A Low St Kew NSW 2123)
   extracting the addresses individual components      (2A,Low,St,KEW,NSW,2123)
   determining the type of format the address is in    ('suburban')


If the address cannot be parsed you have the option of cleaning the address
of bad characters, or extracting any portion that was parsed and the portion
that failed.

This module can be used for analysing and improving the quality of
lists of postal addresses.


REQUIRES

Perl, version 5.005 or higher
Lingua::EN::NameParse
Parse::RecDescent
Locale::SubCountry

HOW TO INSTALL

    perl Makefile.PL
    make
    make test
    make install


BUGS


COPYRIGHT

Copyright (c) 1999-2004 Kim Ryan. All rights reserved.
This program is free software; you can redistribute it
and/or modify it under the terms of the Perl Artistic License
(see http://www.perl.com/perl/misc/Artistic.html ).

AUTHOR

AddressParse was written by Kim Ryan, kimryan at cpan dot org



</pre></body></html>