2010/6/16 Jimmy O'Regan <[email protected]>
> On 16 June 2010 01:05, Stephen Tigner <[email protected]> wrote:
> > Okay, so the Java standard library doesn't have a multimap, and so I
> > was trying to figure out why the PatternStore in PatternList was a
> > typedef for a multimap instead of just a map in the C++ code. I was
> > hoping someone on the list that was more familiar with the C++ code
> > would know why multimap was chosen.
>
Nic Cottrell made the crude (find-and-replace-ish) port of the C++ code but
my impression is that he did not have a deeper understanding of the C++ code
he ported. Later on Jimmy continued.
Neither I, Jimmy or Nic are really familiar with the C++ code, and therefore
neither of us can really give a good answer.
I could take the time to set things up and step-by-step debug thru the C++
code to get deeper understanding, but if the writer of the C++ could reply,
that would be great.
I believe it was Felipe who wrote it, no?
> >
> > I'm trying to figure this out to see if I really need to go to the
> > trouble of figuring out a suitable replacement for the C++ multimap in
> > the Java version, or if I could get away with a standard map.
> >
>
> The key point is, in a multimap, while the keys are unique, the values
> are not. You have to assume that was deliberate. In the tagger, you
> can consider the disambiguation process to be choosing the best value
> from a number of alternatives, so it's vital that you have those
> alternatives. Luckily, you don't need to do much to emulate a multimap
> in Java - use Lists for your values.
>
That's probably the best bet for now - until some of us have a deeper
understanding of how it's used.
>
> I'm glad to see you're not repeating my mistake of trusting that code :)
>
I agree. don't trust the parts in the 'tagger' package.
--
Jacob Nordfalk
------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit. See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Apertium-stuff mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/apertium-stuff