Text-Metaphone-20160805/0000755000076500000240000000000012751274265014735 5ustar schwernpostgresText-Metaphone-20160805/.travis.yml0000644000076500000240000000015412751274221017036 0ustar schwernpostgreslanguage: perl perl: - "5.22" - "5.20" - "5.18" - "5.16" - "5.14" - "5.12" - "5.10" - "5.8" Text-Metaphone-20160805/appveyor.yml0000644000076500000240000000057112751274221017320 0ustar schwernpostgresbranches: except: - /travis/ skip_tags: true cache: - C:\strawberry install: - if not exist "C:\strawberry" cinst strawberryperl - set PATH=C:\strawberry\perl\bin;C:\strawberry\perl\site\bin;C:\strawberry\c\bin;%PATH% - cd C:\projects\%APPVEYOR_PROJECT_NAME% - cpanm --installdeps . build_script: - perl Makefile.PL - dmake test_script: - dmake test Text-Metaphone-20160805/Changes0000644000076500000240000000604312751274221016223 0ustar schwernpostgres20160805 Fri Aug 5 12:00:12 PDT 2016 Bug Fixes * Refix the memory allocation problem on Strawberry Perl broken in the last release. (Michael G Schwern) Distribution Changes * Start using AppVeyor for CI testing of Strawberry Perl. (Michael G Schwern) 20160804 Thu Aug 4 19:58:49 PDT 2016 Bug Fixes * Memory error if the word ends in X. (Michael G Schwern) [rt.cpan.org 73816] [github 1] Doc Fixes * Small spelling error from Debian (Nick Morrott) [rt.cpan.org 115468] Distribution Changes * Now using Github for bugs. * Now using Github for the repository. * Now using metacpan.org as a homepage. 20081017 Fri Oct 17 10:58:33 PDT 2008 Bug Fixes * Fixed freeing of internal string so it will now build on Strawberry. [rt.cpan.org 34448] 2.01 Fri Oct 10 08:56:32 EDT 2008 Bug Fixes * An allocation bug would cause a crash if your phoned word is the same length as the original word. (Thanks Dan Markham) - Fixed POD errors Docs - Mention some of the other phonetic modules. Portability * Fix compilation on VMS [rt.cpan.org 36208] 2.00 Sat Jun 30 01:48:07 CDT 2007 Bug Fixes * Metaphone() no longer leaks memory. [rt.cpan.org 20901] Performance * Eliminated a Perl function wrapper around the XS code. Its about twice as fast now. 1.96 Thu Mar 4 18:44:02 EST 1999 - DumbFS fix, changed metaphone.c to metaphone_c.c so that the XS generated file Metaphone.c does not conflict with it on case-insensitive filesystems. (Thanks Pudge) 1.95 Wed Jan 27 15:02:47 EST 1999 * Fixed 'CK'->'KK' bug. ('CK' is now 'K') - Added README and INSTALL docs - Moved test.pl to t/metaphone.t 1.94 Fri Jan 22 15:26:30 EST 1999 - Defined NULL for myself. Fixes bug on SunOS 4.1.x 1.93 Thu Jan 21 21:34:40 EST 1999 * Removed empty string asseration. * Fixed "W if followed by a vowel" (Thanks to Paul Walmsley) * Fixed "Ignore C if SC[IEY]" * Fixed array boundry problems in ENCODE. 1.92 Tue Jan 5 21:44:11 EST 1999 * Alterations to API removed Text::Soundex emulation layer removed everything but Metaphone() * Alterations to algorithm: CHR -> KR 'Christ', 'tchrist' - Finished POD - First CPAN release since 0.02 1.91 Mon Jan 4 21:00:00 EST 1999 - Fixed memory leak - Started POD 1.90 Mon Jan 4 03:20:00 EST 1999 - First working XS - Has memory leak - Fixed Schw bug * Alterations to algorithm: SCHW -> X 'Schwern', 'Schwartz' SCH -> SK 'School' Heh, what happened to 1.00? Never existed, it was supposed to be the gamma release of the pure perl version of the module. Skipped straight to 1.90, alpha XS version. BTW The new XS version is about 40x faster than the old perl version. :) 0.02 Tue Dec 2 10:18:27 EST 1997 - First release to CPAN. - Added POD documentation. - MaxPhonemeLen is no longer exported. 0.01 Tue Dec 2 05:15:49 1997 - original version; created by h2xs 1.18 Text-Metaphone-20160805/INSTALL0000644000076500000240000000102712751274221015756 0ustar schwernpostgresWHAT IS THIS? This is Text::Metaphone, a perl module. Please see the README that comes with this distribution. HOW DO I INSTALL IT? To install this module, cd to the directory that contains this README file and type the following: perl Makefile.PL make make test make install To install this module into a specific directory, do: perl Makefile.PL PREFIX=/name/of/the/directory ...the rest is the same... Please also read the perlmodinstall man page, if available. WHAT EXTRAS DO I NEED? An ANSI C compiler Text-Metaphone-20160805/Makefile.PL0000644000076500000240000000352112751274221016700 0ustar schwernpostgres#!/usr/bin/perl use strict; use ExtUtils::MakeMaker; my $mm_ver = ExtUtils::MakeMaker->VERSION; eval { require Text::Metaphone; }; unless ($@) { # Make sure we did find the module. print <= 1.00 && $Text::Metaphone::VERSION <= 1.94); NOTE: Bugs fixed in this version alter the way Text::Metaphone encodes certain words. If you have stored metaphone encodings using your older version of T::M, please re-encode them with this new version. Please read the Changes file for details. FIX_WARN } use Config; my $obj_ext = $Config{obj_ext}; WriteMakefile( NAME => 'Text::Metaphone', VERSION_FROM => 'Metaphone.pm', ABSTRACT_FROM => 'Metaphone.pm', AUTHOR => 'Michael G Schwern ', ($mm_ver >= 6.31 ? (LICENSE => 'perl') : ()), PREREQ_PM => { 'Test::More' => 0.47 }, C => ['metaphone_c.c'], OBJECT => "metaphone_c$obj_ext Metaphone$obj_ext", ($mm_ver <= 6.44 ? () : (META_MERGE => { requires => { perl => '5.6.0', }, resources => { license => 'http://dev.perl.org/licenses/', homepage => 'https://metacpan.org/release/Text-Metaphone', bugtracker => 'https://github.com/schwern/Text-Metaphone/issues', repository => 'https://github.com/schwern/Text-Metaphone/', }, })) ); sub MY::postamble { " metaphone_c$obj_ext : metachar.h metaphone.h metaphone_c.c " } Text-Metaphone-20160805/MANIFEST0000644000076500000240000000054512751274265016072 0ustar schwernpostgres.travis.yml appveyor.yml Changes INSTALL Makefile.PL MANIFEST This list of files MANIFEST.SKIP metachar.h metaphone.h Metaphone.pm Metaphone.xs metaphone_c.c README t/metaphone.t typemap META.yml Module YAML meta-data (added by MakeMaker) META.json Module JSON meta-data (added by MakeMaker) Text-Metaphone-20160805/MANIFEST.SKIP0000644000076500000240000000241012751161065016621 0ustar schwernpostgres #!start included /Users/schwern/perl5/perlbrew/perls/perl-5.20.2/lib/site_perl/5.20.2/ExtUtils/MANIFEST.SKIP # Avoid version control files. \bRCS\b \bCVS\b \bSCCS\b ,v$ \B\.svn\b \B\.git\b \B\.gitignore\b \b_darcs\b \B\.cvsignore$ # Avoid VMS specific MakeMaker generated files \bDescrip.MMS$ \bDESCRIP.MMS$ \bdescrip.mms$ # Avoid Makemaker generated and utility files. \bMANIFEST\.bak \bMakefile$ \bblib/ \bMakeMaker-\d \bpm_to_blib\.ts$ \bpm_to_blib$ \bblibdirs\.ts$ # 6.18 through 6.25 generated this \b_eumm/ # 7.05_05 and above # Avoid Module::Build generated and utility files. \bBuild$ \b_build/ \bBuild.bat$ \bBuild.COM$ \bBUILD.COM$ \bbuild.com$ # and Module::Build::Tiny generated files \b_build_params$ # Avoid temp and backup files. ~$ \.old$ \#$ \b\.# \.bak$ \.tmp$ \.# \.rej$ \..*\.sw.?$ # Avoid OS-specific files/dirs # Mac OSX metadata \B\.DS_Store # Mac OSX SMB mount metadata files \B\._ # Avoid Devel::Cover and Devel::CoverX::Covered files. \bcover_db\b \bcovered\b # Avoid prove files \B\.prove$ # Avoid MYMETA files ^MYMETA\. #!end included /Users/schwern/perl5/perlbrew/perls/perl-5.20.2/lib/site_perl/5.20.2/ExtUtils/MANIFEST.SKIP # Avoid our own distdir ^Text-Metaphone-20160804/ # Avoid our build artifacts \.o$ ^Metaphone\.c$ Text-Metaphone-20160805/META.json0000644000076500000240000000250712751274265016362 0ustar schwernpostgres{ "abstract" : "A modern soundex. Phonetic encoding of words.", "author" : [ "Michael G Schwern " ], "dynamic_config" : 1, "generated_by" : "ExtUtils::MakeMaker version 7.1, CPAN::Meta::Converter version 2.150005", "license" : [ "perl_5" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : "2" }, "name" : "Text-Metaphone", "no_index" : { "directory" : [ "t", "inc" ] }, "prereqs" : { "build" : { "requires" : { "ExtUtils::MakeMaker" : "0" } }, "configure" : { "requires" : { "ExtUtils::MakeMaker" : "0" } }, "runtime" : { "requires" : { "Test::More" : "0.47", "perl" : "v5.6.0" } } }, "release_status" : "stable", "resources" : { "bugtracker" : { "web" : "https://github.com/schwern/Text-Metaphone/issues" }, "homepage" : "https://metacpan.org/release/Text-Metaphone", "license" : [ "http://dev.perl.org/licenses/" ], "repository" : { "url" : "https://github.com/schwern/Text-Metaphone/" } }, "version" : "20160805", "x_serialization_backend" : "JSON::PP version 2.27203" } Text-Metaphone-20160805/META.yml0000644000076500000240000000147612751274265016216 0ustar schwernpostgres--- abstract: 'A modern soundex. Phonetic encoding of words.' author: - 'Michael G Schwern ' build_requires: ExtUtils::MakeMaker: '0' configure_requires: ExtUtils::MakeMaker: '0' dynamic_config: 1 generated_by: 'ExtUtils::MakeMaker version 7.1, CPAN::Meta::Converter version 2.150005' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: '1.4' name: Text-Metaphone no_index: directory: - t - inc requires: Test::More: '0.47' perl: v5.6.0 resources: bugtracker: https://github.com/schwern/Text-Metaphone/issues homepage: https://metacpan.org/release/Text-Metaphone license: http://dev.perl.org/licenses/ repository: https://github.com/schwern/Text-Metaphone/ version: '20160805' x_serialization_backend: 'CPAN::Meta::YAML version 0.012' Text-Metaphone-20160805/metachar.h0000644000076500000240000000150112751274221016657 0ustar schwernpostgres#ifndef __METACHAR_H__ #define __METACHAR_H__ /* Metachar.h ... little bits about characters for metaphone */ /*-- Character encoding array & accessing macros --*/ /* Stolen directly out of the book... */ char _codes[26] = { 1,16,4,16,9,2,4,16,9,2,0,2,2,2,1,4,0,2,4,4,1,0,0,0,8,0 /* a b c d e f g h i j k l m n o p q r s t u v w x y z */ }; #define ENCODE(c) (isalpha(c) ? _codes[((toupper(c)) - 'A')] : 0) #define isvowel(c) (ENCODE(c) & 1) /* AEIOU */ /* These letters are passed through unchanged */ #define NOCHANGE(c) (ENCODE(c) & 2) /* FJMNR */ /* These form dipthongs when preceding H */ #define AFFECTH(c) (ENCODE(c) & 4) /* CGPST */ /* These make C and G soft */ #define MAKESOFT(c) (ENCODE(c) & 8) /* EIY */ /* These prevent GH from becoming F */ #define NOGHTOF(c) (ENCODE(c) & 16) /* BDH */ #endif Text-Metaphone-20160805/metaphone.h0000644000076500000240000000060212751274221017054 0ustar schwernpostgres#ifndef __METAPHONE_H__ #define __METAPHONE_H__ #include /* I add modifications to the traditional metaphone algorithm that you might find in books. Define this if you want metaphone to behave traditionally */ #undef USE_TRADITIONAL_METAPHONE /* Special encodings */ #define SH 'X' #define TH '0' char *metaphone (char *word, size_t max_phonemes ); #endif Text-Metaphone-20160805/Metaphone.pm0000644000076500000240000000545112751274221017210 0ustar schwernpostgrespackage Text::Metaphone; use strict; use warnings; require Exporter; require DynaLoader; use integer; our @ISA = qw(Exporter DynaLoader); our @EXPORT = qw( Metaphone ); our $VERSION = '20160805'; bootstrap Text::Metaphone $VERSION; 1; __END__ =pod =head1 NAME Text::Metaphone - A modern soundex. Phonetic encoding of words. =head1 SYNOPSIS use Text::Metaphone; # XWRN my $phoned_word = Metaphone('Schwern'); =head1 DESCRIPTION C is a function whereby a string/word is broken down into a rough approximation of its english phonetic pronunciation. Very similar in concept and purpose to soundex, but much more comprehensive in its approach. =head1 FUNCTIONS =head3 Metaphone $phoned_word = Metaphone($word, $max_phone_len); Takes a word and encodes it according to the Metaphone algorithm. The algorithm only deals with alphabetical characters, all else is ignored. If $max_phone_len is provided, Metaphone will only encode up to that many characters for each word. 'sh' is encoded as 'X', 'th' is encoded as '0'. This can be changed in the metaphone.h header file. =head1 CAVEATS =head3 Metaphone algorithm changes I have made a few minor changes to the traditional metaphone algorithm found in the books. The most significant one is that it will differenciate between SCH and SCHW making the former K (As in School) and the latter sh (as in Schwartz and Schwern). My changes can be turned off by defining the USE_TRADITIONAL_METAPHONE flag in metaphone.h. Due to these changes, any users of Metaphone v1.00 or earlier which have stored metaphonetic encodings, they should recalculate those with the new version. =head1 AUTHOR Michael G Schwern =head1 SEE ALSO =head2 Man pages L - A simpler word hashing algorithm L - Improved metaphone L - A collection of phonetic algorithms =head2 Books, Journals and Magazines =head3 Binstock, Andrew & Rex, John. "Metaphone: A Modern Soundex." I Reading, Mass: Addion-Wesley, 1995 pp160-169 Contains an explanation of the basic metaphone concept & algorithm and C code from which I learned of Metaphone and ported this module. =head3 Parker, Gary. "A Better Phonetic Search." I, Vol. 5, No. 4 (June/July), 1990. This is the public-domain C version of metaphone from which Binstock & Rex based their own.. I haven't actually read it. =head3 Philips, Lawrence. I, Vol. 7, No. 12 (December), 1990. And here's the original Metaphone algorithm as presented in Pick BASIC. =head1 COPYRIGHT and LICENSE Copyright (c) 1997, 1999, 2007-2008 Michael G Schwern. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut Text-Metaphone-20160805/Metaphone.xs0000644000076500000240000000124512751274221017223 0ustar schwernpostgres#include "EXTERN.h" #include "perl.h" #include "XSUB.h" #include "metaphone.h" MODULE = Text::Metaphone PACKAGE = Text::Metaphone PROTOTYPES: ENABLE SV * Metaphone(word, ...) char* word PROTOTYPE: $;$ PREINIT: size_t max_length = 0; INIT: char *phoned_word; CODE: if( items > 1 ) { max_length = SvIV(ST(1)); } phoned_word = metaphone(word, max_length); RETVAL = newSVpv(phoned_word, 0); /* Use the real free() to free memory allocated by the real calloc() */ #undef free free(phoned_word); OUTPUT: RETVAL Text-Metaphone-20160805/metaphone_c.c0000644000076500000240000002574212751274221017365 0ustar schwernpostgres/* STUFF TO DO * - Make max_phonemes useful */ #include "metaphone.h" #include "metachar.h" #include #include #include /* I suppose I could have been using a character pointer instead of * accesssing the array directly... */ /* Look at the next letter in the word */ #define Next_Letter (toupper(word[w_idx+1])) /* Look at the current letter in the word */ #define Curr_Letter (toupper(word[w_idx])) /* Go N letters back. */ #define Look_Back_Letter(n) (w_idx >= n ? toupper(word[w_idx-n]) : '\0') /* Previous letter. I dunno, should this return null on failure? */ #define Prev_Letter (Look_Back_Letter(1)) /* Look two letters down. It makes sure you don't walk off the string. */ #define After_Next_Letter (Next_Letter != '\0' ? toupper(word[w_idx+2]) \ : '\0') #define Look_Ahead_Letter(n) (toupper(Lookahead(word+w_idx, n))) /* Allows us to safely look ahead an arbitrary # of letters */ /* I probably could have just used strlen... */ char Lookahead(char * word, int how_far) { char letter_ahead = '\0'; /* null by default */ int idx; for(idx = 0; word[idx] != '\0' && idx < how_far; idx++); /* Edge forward in the string... */ letter_ahead = word[idx]; /* idx will be either == to how_far or * at the end of the string */ return letter_ahead; } /* phonize one letter */ #define Phonize(c) {phoned_word[p_idx++] = c;} /* How long is the phoned word? */ #define Phone_Len (p_idx) /* Note is a letter is a 'break' in the word */ #define Isbreak(c) (!isalpha(c)) char *metaphone ( char *word, size_t max_phonemes ) { int w_idx = 0; /* point in the phonization we're at. */ int p_idx = 0; /* end of the phoned phrase */ char *phoned_word; /* Assume largest possible if we're given no limit */ if( max_phonemes == 0 ) max_phonemes = strlen(word); /* It's +2 because X -> KS can result in the phoned word being one larger than the original word. */ phoned_word = calloc( max_phonemes + 2, sizeof(char) ); /*-- The first phoneme has to be processed specially. --*/ /* Find our first letter */ for( ; !isalpha(Curr_Letter); w_idx++ ) { /* On the off chance we were given nothing but crap... */ if( Curr_Letter == '\0' ) { return phoned_word; } } switch (Curr_Letter) { /* AE becomes E */ case 'A': if( Next_Letter == 'E' ) { Phonize('E'); w_idx+=2; } /* Remember, preserve vowels at the beginning */ else { Phonize('A'); w_idx++; } break; /* [GKP]N becomes N */ case 'G': case 'K': case 'P': if( Next_Letter == 'N' ) { Phonize('N'); w_idx+=2; } break; /* WH becomes H, WR becomes R W if followed by a vowel */ case 'W': if( Next_Letter == 'H' || Next_Letter == 'R' ) { Phonize(Next_Letter); w_idx+=2; } else if ( isvowel(Next_Letter) ) { Phonize('W'); w_idx+=2; } /* else ignore */ break; /* X becomes S */ case 'X': Phonize('S'); w_idx++; break; /* Vowels are kept */ /* We did A already case 'A': case 'a': */ case 'E': case 'I': case 'O': case 'U': Phonize(Curr_Letter); w_idx++; break; default: /* do nothing */ break; } /* On to the metaphoning */ for(; Curr_Letter != '\0' && (max_phonemes == 0 || Phone_Len < max_phonemes); w_idx++ ) { /* How many letters to skip because an eariler encoding handled * multiple letters */ unsigned short int skip_letter = 0; /* THOUGHT: It would be nice if, rather than having things like... * well, SCI. For SCI you encode the S, then have to remember * to skip the C. So the phonome SCI invades both S and C. It would * be better, IMHO, to skip the C from the S part of the encoding. * Hell, I'm trying it. */ /* Ignore non-alphas */ if( !isalpha(Curr_Letter) ) continue; /* Drop duplicates, except CC */ if( Curr_Letter == Prev_Letter && Curr_Letter != 'C' ) continue; switch (Curr_Letter) { /* B -> B unless in MB */ case 'B': if( Prev_Letter != 'M' ) Phonize('B'); break; /* 'sh' if -CIA- or -CH, but not SCH, except SCHW. * (SCHW is handled in S) * S if -CI-, -CE- or -CY- * dropped if -SCI-, SCE-, -SCY- (handed in S) * else K */ case 'C': if( MAKESOFT(Next_Letter) ) { /* C[IEY] */ if( After_Next_Letter == 'A' && Next_Letter == 'I' ) { /* CIA */ Phonize(SH); } /* SC[IEY] */ else if ( Prev_Letter == 'S' ) { /* Dropped */ } else { Phonize('S'); } } else if ( Next_Letter == 'H' ) { #ifndef USE_TRADITIONAL_METAPHONE if( After_Next_Letter == 'R' || Prev_Letter == 'S' ) { /* Christ, School */ Phonize('K'); } else { Phonize(SH); } #else Phonize(SH); #endif skip_letter++; } else { Phonize('K'); } break; /* J if in -DGE-, -DGI- or -DGY- * else T */ case 'D': if( Next_Letter == 'G' && MAKESOFT(After_Next_Letter) ) { Phonize('J'); skip_letter++; } else Phonize('T'); break; /* F if in -GH and not B--GH, D--GH, -H--GH, -H---GH * else dropped if -GNED, -GN, * else dropped if -DGE-, -DGI- or -DGY- (handled in D) * else J if in -GE-, -GI, -GY and not GG * else K */ case 'G': if( Next_Letter == 'H' ) { if( !( NOGHTOF(Look_Back_Letter(3)) || Look_Back_Letter(4) == 'H' ) ) { Phonize('F'); skip_letter++; } else { /* silent */ } } else if( Next_Letter == 'N' ) { if( Isbreak(After_Next_Letter) || ( After_Next_Letter == 'E' && Look_Ahead_Letter(3) == 'D' ) ) { /* dropped */ } else Phonize('K'); } else if( MAKESOFT(Next_Letter) && Prev_Letter != 'G' ) { Phonize('J'); } else { Phonize('K'); } break; /* H if before a vowel and not after C,G,P,S,T */ case 'H': if( isvowel(Next_Letter) && !AFFECTH(Prev_Letter) ) Phonize('H'); break; /* dropped if after C * else K */ case 'K': if( Prev_Letter != 'C' ) Phonize('K'); break; /* F if before H * else P */ case 'P': if( Next_Letter == 'H' ) { Phonize('F'); } else { Phonize('P'); } break; /* K */ case 'Q': Phonize('K'); break; /* 'sh' in -SH-, -SIO- or -SIA- or -SCHW- * else S */ case 'S': if( Next_Letter == 'I' && ( After_Next_Letter == 'O' || After_Next_Letter == 'A' ) ) { Phonize(SH); } else if ( Next_Letter == 'H' ) { Phonize(SH); skip_letter++; } #ifndef USE_TRADITIONAL_METAPHONE else if ( Next_Letter == 'C' && Look_Ahead_Letter(2) == 'H' && Look_Ahead_Letter(3) == 'W' ) { Phonize(SH); skip_letter += 2; } #endif else { Phonize('S'); } break; /* 'sh' in -TIA- or -TIO- * else 'th' before H * else T */ case 'T': if( Next_Letter == 'I' && ( After_Next_Letter == 'O' || After_Next_Letter == 'A' ) ) { Phonize(SH); } else if ( Next_Letter == 'H' ) { Phonize(TH); skip_letter++; } else { Phonize('T'); } break; /* F */ case 'V': Phonize('F'); break; /* W before a vowel, else dropped */ case 'W': if( isvowel(Next_Letter) ) Phonize('W'); break; /* KS */ case 'X': Phonize('K'); Phonize('S'); break; /* Y if followed by a vowel */ case 'Y': if( isvowel(Next_Letter) ) Phonize('Y'); break; /* S */ case 'Z': Phonize('S'); break; /* No transformation */ case 'F': case 'J': case 'L': case 'M': case 'N': case 'R': Phonize(Curr_Letter); break; default: /* nothing */ break; } w_idx += skip_letter; } return phoned_word; } Text-Metaphone-20160805/README0000644000076500000240000000171412751274221015610 0ustar schwernpostgresNAME Text::Metaphone - A modern soundex. Phonetic encoding of words. SYNOPSIS use Text::Metaphone; $phoned_words = Metaphone('Schwern'); DESCRIPTION C is a function whereby a string/word is broken down into a rough approximation of its english phonetic pronunciation. Very similar in concept and purpose to soundex, but much more comprehensive in its approach. AUTHOR Michael G Schwern WHAT IS THIS? This is Text::Metaphone, a perl module. Please see the README that comes with this distribution. HOW DO I INSTALL IT? To install this module, cd to the directory that contains this README file and type the following: perl Makefile.PL make make test make install To install this module into a specific directory, do: perl Makefile.PL PREFIX=/name/of/the/directory ...the rest is the same... Please also read the perlmodinstall man page, if available. WHAT EXTRAS DO I NEED? An ANSI C compilerText-Metaphone-20160805/t/0000755000076500000240000000000012751274265015200 5ustar schwernpostgresText-Metaphone-20160805/t/metaphone.t0000644000076500000240000000224012751274221017333 0ustar schwernpostgres#!/usr/bin/perl -w use Test::More 'no_plan'; BEGIN { use_ok "Text::Metaphone"; } my %test_phones = ( 'recrudescence' => 'RKRTSNS', 'moist' => 'MST', 'Gutenberg' => 'KTNBRK', 'recridessence' => 'RKRTSNS', 'crapulance' => 'KRPLNS', 'cough' => 'KF', 'coffee' => 'KF', 'tchrist' => 'TKRST', 'Schwern' => 'XWRN', 'Schwartz' => 'XWRTS', 'Avulsion' => 'AFLXN', 'Aeon' => 'EN', 'Mushrooms' => 'MXRMS', 'Way' => 'W', 'What' => 'HT', 'Wierd' => 'WRT', '' => '', 'picklehead'=> 'PKLHT', # Caused a crash because phoned word == length of word revealing # an off-by-one allocation mistake. 'nsxkgbsfdtp' => 'NSKSKKBSFTT', # An X on the end can make the phoned word one larger than the original. 'jgVqiNdxNVLpVBxQBlxghDx' => 'JKFKNTKSNFLPFBKSKBLKSTKS', 'ax1x1x' => 'AKSKSKS' ); foreach my $word (keys %test_phones) { is Metaphone($word), $test_phones{$word}, "$word"; } Text-Metaphone-20160805/typemap0000644000076500000240000000002112751274221016320 0ustar schwernpostgresTYPEMAP flag T_IV