(For those of you who missed javanlp last time, we decided to have a biweekly "Did you know...?" email, where someone introduces a non-general-knowledge fact about javanlp (or just java) that they've found useful.) nlp.util.Index is a very simple idea that is incredibly useful. It allows you to easily make a one-to-one mapping of Objects to ints in the range 0..n. This can represent enormous time savings in intense computations by letting you use arrays indexed by ints instead of Maps indexed by Objects. For example, during PCFG parsing, for each span (x,y), it is necessary to repeatedly look up scores associated with each String-valued category label. The naive way to do this would be to have a 2-D array of Maps from String to Double. But if you've compiled an Index of the category labels, you can perform the whole parse using a 3-D array of doubles, never having to do a single hashCode evaluation! Chris (Cox) has recently made Index *even better* by genericizing it. -++**==--++**==--++**==--++**==--++**==--++**==--++**==--++**== This message was posted through the Stanford campus mailing list server. If you wish to unsubscribe from this mailing list, send the message body of "unsubscribe java-nlp-list" to majordomo@lists.stanford.edu