Skip to content

jeffa/String-Normal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

78 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

String::Normal

Transform strings into a normal form. CPAN Version

Synopsis

normalizer --value='Jones & Sons Bakeries'

normalizer --value='Los Angeles' --type='city'

normalizer --file=addresses.txt --type=address

Backend API

use String::Normal;

my $normalizer = String::Normal->new( type => 'name' );
print $normalizer->transform( 'Jones & Sons Bakeries' );     # bakeri jone son

$normalizer = String::Normal->new( type => 'address' );
print $normalizer->transform( '123 Main Street Suite A47' ); # 123 main st

$normalizer = String::Normal->new( type => 'phone' );
print $normalizer->transform( '(818) 423-7750' );            # 8184237750

$normalizer = String::Normal->new( type => 'city' );
print $normalizer->transform( 'Los Angeles' );               # los angeles

$normalizer = String::Normal->new( type => 'state' );
print $normalizer->transform( 'California' );                # ca

$normalizer = String::Normal->new( type => 'zip' );
print $normalizer->transform( '90292' );                     # 90292

Installation

To install this module, you should use CPAN. A good starting place is How to install CPAN modules.

If you truly want to install from this github repo, then be sure and create the manifest before you test and install:

perl Makefile.PL
make
make manifest
make test
make install

Support and Documentation

After installing, you can find documentation for this module with the perldoc command.

perldoc String::Normal

License and Copyright

See source POD.

About

Transform strings into a normal form.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages