On Thu, Jul 21, 2011 at 10:49 AM, Jörn Kottmann <[email protected]> wrote:
> On 7/21/11 3:46 PM, [email protected] wrote: > >> Shouldn't we change UIMA sentence detector trainer to pass an abbreviation >> dictionary? It would solve the issue for UIMA. >> >> >> It won't help other people that is using the API and passing null. I will >> think how to solve it. >> > > No, the API must stay compatible with existing code. Should I just change the parameters order? For some reason the API was using a Dictionary to represent the abbreviation dictionary, but it was never used in the default context generator. Initially I was thinking about using this Dictionary implementation, but according to DefaultSDContextGenerator an abbreviation dictionary should implement Set<String> and since Dictionary was already implementing Iterable<StringList> it can't also implement Set<String>. Another option should be to remove the new AbbreviationDictionary class and try to use Dictionary instead. Maybe adding a method "asStringSet()" that creates a Set<String> from the Dictionary and we can pass it to the context generator. What do you think?
