On 7/21/11 5:04 PM, Tommaso Teofili wrote:
I don't have enough knowledge of this part but I wonder if a little
refactoring consisting of creating an interface Dictionary and 2
implementing classes i.e. SimpleDictionary and AbbreviationsDictionary could
help.
Well, we are pretty limited here in terms of options because we only do
a minor release and cannot change our public API.
Adding a new type like we did here is ok, but the problem is how the train
method is overloaded.
Anyway we might end up doing some redesign of the the whole dictionary
support soon, to integrate other kinds of dictionaries, e.g. bloom
filter based
or one with a better internal data structure.
Since dictionaries are always shared it would be better if they are
immutable,
which they are currently not.
Jörn