Skip to Content.
Sympa Menu

illinois-ml-nlp-users - Re: [Illinois-ml-nlp-users] LBJ 2.8.0 released!

illinois-ml-nlp-users AT lists.cs.illinois.edu

Subject: Support for users of CCG software closed 7-27-20

List archive

Re: [Illinois-ml-nlp-users] LBJ 2.8.0 released!


Chronological Thread 
  • From: Lars Buitinck <larsmans AT gmail.com>
  • To: Nicholas Rizzolo <rizzolo AT gmail.com>
  • Cc: illinois-ml-nlp-users AT cs.uiuc.edu
  • Subject: Re: [Illinois-ml-nlp-users] LBJ 2.8.0 released!
  • Date: Thu, 3 Mar 2011 22:18:04 +0100
  • List-archive: <http://lists.cs.uiuc.edu/pipermail/illinois-ml-nlp-users>
  • List-id: Support for users of CCG software <illinois-ml-nlp-users.cs.uiuc.edu>

2011/3/3 Nicholas Rizzolo
<rizzolo AT gmail.com>:
> On Thu, Mar 3, 2011 at 2:55 PM, Lars Buitinck
> <larsmans AT gmail.com>
> wrote:
>>
>> 2011/3/3 Nicholas Rizzolo
>> <rizzolo AT gmail.com>:
>> > Also new in this release is the "cachedinmap" keyword, which provides
>> > similar functionality to "cachedin" in that its cache will retain the
>> > prediction of each input object as long as that object is still in
>> > memory.
>> > But while "cachedin" puts the prediction in a field of the object,
>> > "cachedinmap" puts it in a WeakHashMap where the associated key is the
>> > input
>> > object.  The "cached" and "cachedinmap" keywords may be used
>> > simultaneously,
>> > but the "cachedin" and "cachedinmap" keywords cannot.
>>
>> Great news, this was on top my feature list. But why a WeakHashMap?
>> Wouldn't it be wiser to require the argument to be something that
>> implements Map and advise users to use a WeakHashMap?
>
> The original idea (a suggestion from another user) was just to provide the
> user with a way to do this type of caching without requiring the user to
> provide anything extra.  ("cachedin" requires you to declare a new field in
> your class, if you don't have one declared for the purpose already.)  But
> your suggestion is also good.  What if we give "cachedinmap" an optional
> argument so the user can provide his own map, and the default when the
> argument is omitted will be WeakHashMap?

Actually, I misread your description. I assumed we could now put a
single WeakHashMap in the object instead of a whole bunch of caching
members (public WeakHashMap lbjCache). I like the in-object caching,
just not the clutter that it causes.

Maybe you could overload the cachedin keyword to work on a Map field?

> Also, I'd love to see your feature list.  :)

Ehm, an IDE? No, kidding. Fewer NullPointerException now top the wist
list. When I have time, I'll try and hunt a few done. They seem to
appear and disappear randomly between rebuilds/retrains of LBJ code.





Archive powered by MHonArc 2.6.16.

Top of Page