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. > > 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. I'm glad to see you're not repeating my mistake of trusting that code :) -- <Leftmost> jimregan, that's because deep inside you, you are evil. <Leftmost> Also not-so-deep inside you. ------------------------------------------------------------------------------ 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
