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 com.tangentum.phonetix.DoubleMetaphone

         * @param in token stream
         */
        public PhoneticFilter( final TokenStream in)
        {
            super(in);
            encoder = new DoubleMetaphone();
        }
    View Full Code Here

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

        params.set("input", inputDir);
        params.set("output", outputDir);
        params.set("selectedField", "1"); // tweet
        params.set("groupByField", "0"); // username
        ByKeyGroupingJob.startJob(params);
        DoubleMetaphone filter = new DoubleMetaphone();
    // TODO: change these terms?!
        System.out.println(filter.encode("Loke"));
        System.out.println(filter.encode("companymancomic"));
        System.out.println(filter.encode("webcomics"));
        System.out.println(filter.encode("@comic"));
      }
    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

        }
        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" ) );
        }
       
        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

    public class DoubleMetaphoneKeyer extends Keyer {

        private DoubleMetaphone _metaphone2;

        public DoubleMetaphoneKeyer() {
            _metaphone2 = new DoubleMetaphone();
            _metaphone2.setMaxCodeLen(2000);
        }
    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.