opennlp-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jörn Kottmann <kottm...@gmail.com>
Subject Re: Dictionary and Case-Sensitivity
Date Thu, 28 Jul 2011 08:44:27 GMT
On 7/28/11 10:19 AM, Jörn Kottmann wrote:
> Lets refactor the Dictionary class a bit to get rid of this 
> StringListWrapper badness. 

Dictionary is currently using a HashSet to keep track of all its 
entries. The StringListWrapper
was made to exchange the StringList equals and hashCode methods in case 
they should
case insensitive.

So far so good, the way they are implemented for the case insensitive 
case needs to be improved
because they are always lower casing the string entries first to compute 
a lower case hash sum.

Is there any other way to define a custom equals and hashCode
methods than using a wrapper object?

Jörn

Mime
View raw message