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: Nicholas Rizzolo <rizzolo AT gmail.com>
  • To: Lars Buitinck <larsmans 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 15:09:48 -0600
  • 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>

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?

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

 - Nick


 
Regards,
Lars




Archive powered by MHonArc 2.6.16.

Top of Page