commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary Gregory (JIRA)" <>
Subject [jira] [Commented] (CODEC-161) Add phonetic algorithm Match Rating Approach (MRA) to the commons codec
Date Fri, 26 Oct 2012 19:53:12 GMT


Gary Gregory commented on CODEC-161:

Hello Colm,

Thank you for the patch. Welcome to our little [codec] world!

Please find my code review below.

# General note: Look at the code around you in [codec] and follow the conventions you see.
# Rename the main class from {{MatchRatingApproach}} to {{MatchRatingApproachEncoder}}
# All methods start with a lower case, so rename {{public static String GetMRA(String name)}}
to {{GetMRA}}, and so on.
# About @see hyperlink(s) in the Javadoc for {{MatchRatingApproachEncoder}}. If Wikipedia
is all there is, then so be it, but any other documentation would be helpful.
# You can add yourself as a contributor in the pom.xml but I'd rather leave names, emails
(and egos) out of .java files.
# In the Javadocs, "soundex" should be "Soundex".
# Always use blocks. IOW: if (expr){\n stmt;\n}
# Rename all unit test methods to be prefixed with {{test}} instead of {{MRA_}}.
# The method {{RemoveDoubleConsonants}} (sic) looks like it could be implemented in one loop.
I'd worry about this one last.
# {{PLAIN_ASCII}} and {{UNICODE}} need Javadoc to explain how they are used.
# Rename {{MatchRatingApproachTests}} to {{MatchRatingApproachTest}} (singular) or Maven will
not pick it up in the test suite.
# Improve code coverage from 84% to... can you get it to 100%?
# In-line your test methods from:

    public void MRA_Compare_ZACH_ZAKARIA_SuccessfullyMatched()
        String testInput2 = "Zach";
        String testInput1 = "Zakaria";

        boolean actualRes = MatchRatingApproach.CompareMRA(testInput1, testInput2);




    public void MRA_Compare_ZACH_ZAKARIA_SuccessfullyMatched() {
        assertTrue(MatchRatingApproach.CompareMRA("Zakaria", "Zach"));
> Add phonetic algorithm Match Rating Approach (MRA) to the commons codec
> -----------------------------------------------------------------------
>                 Key: CODEC-161
>                 URL:
>             Project: Commons Codec
>          Issue Type: New Feature
>    Affects Versions: 1.6
>            Reporter: Colm Rice
>            Priority: Minor
>              Labels: newbie
>         Attachments: CODEC-161-MatchRatingApproach.patch
>   Original Estimate: 168h
>  Remaining Estimate: 168h
> I want to add MatchRatingApproach algorithm to the Lucene project via commons codec.
> What I have at the moment is a class called org.apache.lucene.analysis.phoenetic.MatchRatingApproach
implementing StringEncoder
> I have a pretty comprehensive test file located at: org.apache.lucene.analysis.phonetic.MatchRatingApproachTests
> It's not exactly existing pattern so I'm going to need a bit of advice here. Thanks!
Feel free to email.
> FYI: It my first contribution so be gentle :-)  C# is my native.
> I had incorrectly added this to Lucene solution as LUCENE-4494 but received some good
advice to move it to here. I'm doing that now.
> Reference:

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message