Return-Path: Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: (qmail 39893 invoked from network); 11 Dec 2010 00:47:27 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 11 Dec 2010 00:47:27 -0000 Received: (qmail 21012 invoked by uid 500); 11 Dec 2010 00:47:27 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 20944 invoked by uid 500); 11 Dec 2010 00:47:27 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 20936 invoked by uid 99); 11 Dec 2010 00:47:27 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 11 Dec 2010 00:47:27 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 11 Dec 2010 00:47:24 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id oBB0l2rR018492 for ; Sat, 11 Dec 2010 00:47:02 GMT Message-ID: <19591987.68181292028422619.JavaMail.jira@thor> Date: Fri, 10 Dec 2010 19:47:02 -0500 (EST) From: "Marc Pompl (JIRA)" To: issues@commons.apache.org Subject: [jira] Updated: (CODEC-107) Enhance documentation for Language Encoders In-Reply-To: <19360187.67791292027221897.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/CODEC-107?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Marc Pompl updated CODEC-107: ----------------------------- Description: The current userguide (http://commons.apache.org/codec/userguide.html) just lists four Language Encoders, but there are five at the moment. CODEC-106 implements a sixth one. Would be a good idea, to complete documentation. Additionally, I suggest to extent the userguide in order to show a simple performance measurement: _SNIP_ org.apache.commons.codec.language.Metaphone encodings per msec: 327 org.apache.commons.codec.language.DoubleMetaphone encodings per msec: 224 org.apache.commons.codec.language.Soundex encodings per msec: 904 org.apache.commons.codec.language.RefinedSoundex encodings per msec: 637 org.apache.commons.codec.language.Caverphone encodings per msec: 5 org.apache.commons.codec.language.ColognePhonetic encodings per msec: 289 So, Soundex is the fastest encoder. Caverphone is much slower than any other algorithm. All others show off nearly the same performance. Checked with the following code: {code:java} private static final int REPEATS = 1000000; public void checkSpeed() throws Exception { checkSpeedEncoding(new Metaphone(), "easgasg", REPEATS); checkSpeedEncoding(new DoubleMetaphone(), "easgasg", REPEATS); checkSpeedEncoding(new Soundex(), "easgasg", REPEATS); checkSpeedEncoding(new RefinedSoundex(), "easgasg", REPEATS); checkSpeedEncoding(new Caverphone(), "Carlene", 100000); checkSpeedEncoding(new ColognePhonetic(), "Schmitt", REPEATS); } private void checkSpeedEncoding(Encoder encoder, String toBeEncoded, int repeats) throws Exception { long start = System.currentTimeMillis(); for ( int i=0; i Enhance documentation for Language Encoders > ------------------------------------------- > > Key: CODEC-107 > URL: https://issues.apache.org/jira/browse/CODEC-107 > Project: Commons Codec > Issue Type: Improvement > Affects Versions: 1.4 > Reporter: Marc Pompl > Priority: Minor > Fix For: 1.5 > > Original Estimate: 1h > Remaining Estimate: 1h > > The current userguide (http://commons.apache.org/codec/userguide.html) just lists four Language Encoders, but there are five at the moment. CODEC-106 implements a sixth one. > Would be a good idea, to complete documentation. > Additionally, I suggest to extent the userguide in order to show a simple performance measurement: > _SNIP_ > org.apache.commons.codec.language.Metaphone encodings per msec: 327 > org.apache.commons.codec.language.DoubleMetaphone encodings per msec: 224 > org.apache.commons.codec.language.Soundex encodings per msec: 904 > org.apache.commons.codec.language.RefinedSoundex encodings per msec: 637 > org.apache.commons.codec.language.Caverphone encodings per msec: 5 > org.apache.commons.codec.language.ColognePhonetic encodings per msec: 289 > So, Soundex is the fastest encoder. Caverphone is much slower than any other algorithm. All others show off nearly the same performance. > Checked with the following code: > {code:java} > private static final int REPEATS = 1000000; > public void checkSpeed() throws Exception { > checkSpeedEncoding(new Metaphone(), "easgasg", REPEATS); > checkSpeedEncoding(new DoubleMetaphone(), "easgasg", REPEATS); > checkSpeedEncoding(new Soundex(), "easgasg", REPEATS); > checkSpeedEncoding(new RefinedSoundex(), "easgasg", REPEATS); > checkSpeedEncoding(new Caverphone(), "Carlene", 100000); > checkSpeedEncoding(new ColognePhonetic(), "Schmitt", REPEATS); > } > > private void checkSpeedEncoding(Encoder encoder, String toBeEncoded, int repeats) throws Exception { > long start = System.currentTimeMillis(); > for ( int i=0; i encoder.encode(toBeEncoded); > } > long duration = System.currentTimeMillis()-start; > System.out.println(encoder.getClass().getName() + " encodings per msec: "+(repeats/duration)); > } > {code} > _SNAP_ -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.