Examples of DoubleMetaphone

@author Benjamin Walstrum @author Gary Gregory @version $Id: DoubleMetaphone.java,v 1.14 2003/11/07 23:12:54 ggregory Exp $
  • org.elasticsearch.common.codec.language.DoubleMetaphone

  • Examples of org.apache.commons.codec.language.DoubleMetaphone

        }
        assertNull( filter.next() )// no more tokens
      }
     
      public void testEncodes() throws Exception {
        runner( new DoubleMetaphone(), true );
        runner( new Metaphone(), true );
        runner( new Soundex(), true );
        runner( new RefinedSoundex(), true );

        runner( new DoubleMetaphone(), false );
        runner( new Metaphone(), false );
        runner( new Soundex(), false );
        runner( new RefinedSoundex(), false );
      }
    View Full Code Here

    Examples of org.apache.commons.codec.language.DoubleMetaphone

                        0 == sCompare.compare( "O'Brien", "O'Brian" ) );
        }

        @Test
        public void testComparatorWithDoubleMetaphone() throws Exception {
            StringEncoderComparator sCompare = new StringEncoderComparator(new DoubleMetaphone());

            String[] testArray = { "Jordan", "Sosa", "Prior", "Pryor" };
            List<String> testList = Arrays.asList(testArray);

            String[] controlArray = { "Jordan", "Prior", "Pryor", "Sosa" };
    View Full Code Here

    Examples of org.apache.commons.codec.language.DoubleMetaphone

        }

        @Test
        public void testComparatorWithDoubleMetaphoneAndInvalidInput() throws Exception {
            StringEncoderComparator sCompare =
                new StringEncoderComparator( new DoubleMetaphone() );

            int compare = sCompare.compare(new Double(3.0), Long.valueOf(3));
            assertEquals( "Trying to compare objects that make no sense to the underlying encoder should return a zero compare code",
                                    0, compare);
        }
    View Full Code Here

    Examples of org.apache.commons.codec.language.DoubleMetaphone

                        0 == sCompare.compare( "O'Brien", "O'Brian" ) );
        }

        @Test
        public void testComparatorWithDoubleMetaphone() throws Exception {
            final StringEncoderComparator sCompare = new StringEncoderComparator(new DoubleMetaphone());

            final String[] testArray = { "Jordan", "Sosa", "Prior", "Pryor" };
            final List<String> testList = Arrays.asList(testArray);

            final String[] controlArray = { "Jordan", "Prior", "Pryor", "Sosa" };
    View Full Code Here

    Examples of org.apache.commons.codec.language.DoubleMetaphone

        }

        @Test
        public void testComparatorWithDoubleMetaphoneAndInvalidInput() throws Exception {
            final StringEncoderComparator sCompare =
                new StringEncoderComparator( new DoubleMetaphone() );

            final int compare = sCompare.compare(new Double(3.0), Long.valueOf(3));
            assertEquals( "Trying to compare objects that make no sense to the underlying encoder should return a zero compare code",
                                    0, compare);
        }
    View Full Code Here

    Examples of org.apache.commons.codec.language.DoubleMetaphone

                        0 == sCompare.compare( "O'Brien", "O'Brian" ) );
        }
       
        public void testComparatorWithDoubleMetaphone() throws Exception {
            StringEncoderComparator sCompare =
                new StringEncoderComparator( new DoubleMetaphone() );
               
            String[] testArray = { "Jordan", "Sosa", "Prior", "Pryor" };
            List testList = Arrays.asList( testArray );       
           
            String[] controlArray = { "Jordan", "Prior", "Pryor", "Sosa" };
    View Full Code Here

    Examples of org.apache.commons.codec.language.DoubleMetaphone

            }
        }

        public void testComparatorWithDoubleMetaphoneAndInvalidInput() throws Exception {
            StringEncoderComparator sCompare =
                new StringEncoderComparator( new DoubleMetaphone() );
              
            int compare = sCompare.compare(new Double(3.0), new Long(3));
            assertEquals( "Trying to compare objects that make no sense to the underlying encoder should return a zero compare code",
                                    0, compare);       
           
    View Full Code Here

    Examples of org.apache.commons.codec.language.DoubleMetaphone

                        0 == sCompare.compare( "O'Brien", "O'Brian" ) );
        }
       
        @Test
        public void testComparatorWithDoubleMetaphone() throws Exception {
            StringEncoderComparator sCompare = new StringEncoderComparator(new DoubleMetaphone());

            String[] testArray = { "Jordan", "Sosa", "Prior", "Pryor" };
            List<String> testList = Arrays.asList(testArray);

            String[] controlArray = { "Jordan", "Prior", "Pryor", "Sosa" };
    View Full Code Here

    Examples of org.apache.commons.codec.language.DoubleMetaphone

        }

        @Test
        public void testComparatorWithDoubleMetaphoneAndInvalidInput() throws Exception {
            StringEncoderComparator sCompare =
                new StringEncoderComparator( new DoubleMetaphone() );
              
            int compare = sCompare.compare(new Double(3.0), Long.valueOf(3));
            assertEquals( "Trying to compare objects that make no sense to the underlying encoder should return a zero compare code",
                                    0, compare);       
        }
    View Full Code Here

    Examples of org.apache.commons.codec.language.DoubleMetaphone

        }
        assertNull( filter.next() )// no more tokens
      }
     
      public void testEncodes() throws Exception {
        runner( new DoubleMetaphone(), true );
        runner( new Metaphone(), true );
        runner( new Soundex(), true );
        runner( new RefinedSoundex(), true );

        runner( new DoubleMetaphone(), false );
        runner( new Metaphone(), false );
        runner( new Soundex(), false );
        runner( new RefinedSoundex(), false );
      }
    View Full Code Here
    TOP
    Copyright © 2018 www.massapi.com. All rights reserved.
    All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.