You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Melloware (JIRA)" <ji...@apache.org> on 2019/05/31 11:42:00 UTC
[jira] [Comment Edited] (CODEC-256) ColognePhonetic.encode()
calculates wrong code
[ https://issues.apache.org/jira/browse/CODEC-256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16852929#comment-16852929 ]
Melloware edited comment on CODEC-256 at 5/31/19 11:41 AM:
-----------------------------------------------------------
[~aschnur] I am creating a GitHub PR for your change. You change works however one of the previous unit tests fails and I want to confirm it is failing. Right now it has..
hoffmann=0366
mönchengladbach=664645214
deutsch=28
Zacharias=8478
matsch=68
Eberhard=01772
Eberhardt=01772
Celsius=8558
And with your fix it now reports it should be...
hoffmann=036
mönchengladbach=64645214
deutsch=284
Zacharias=878
matsch=684
Eberhard=0172
Eberhardt=0172
Celsius=858
Can you confirm this is correct?
was (Author: melloware):
[~aschnur] I am creating a GitHub PR for your change. You change works however one of the previous unit tests fails and I want to confirm it is failing. Right now it has..
hoffmann=0366
And with your fix it now reports it should be...
hoffmann=036
Can you confirm this is correct?
> ColognePhonetic.encode() calculates wrong code
> ----------------------------------------------
>
> Key: CODEC-256
> URL: https://issues.apache.org/jira/browse/CODEC-256
> Project: Commons Codec
> Issue Type: Bug
> Affects Versions: 1.12
> Environment: Java 8u181 64, Windows 7 Professional 64
> Reporter: Andreas Schnur
> Priority: Major
> Attachments: ColognePhonetic.java
>
>
> Example String: "ARTMANN". Code of M is 6, Code of A is Zero (and therefore is left out), Code of N is 6 and should be left out because 6 is previous, but Code assumes wrongly 0 as previous (which was left out). So the result is 07266, but has to be 0726 (see Description of algorithm in class).
> Solution: In method colognePhonetic() move the last two LOC into if-block above, see attached version of class.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)