uima-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Petr Baudis <pa...@ucw.cz>
Subject Re: UIMAj3 ideas
Date Thu, 16 Jul 2015 18:37:53 GMT
On Thu, Jul 16, 2015 at 08:00:35PM +0200, Richard Eckart de Castilho wrote:
> On 16.07.2015, at 18:52, Petr Baudis <pasky@ucw.cz> wrote:
> >  Sorry for the confusion, but that's not quite what I had in mind.
> > I literally believe that right now, in order to modify value of
> > a feature, you need to first remove it from an index, change the
> > value, then re-add it back.  Is that a misconception?
> 
> Well, yes and no. Yes, it was required for the case where the value that
> you changed was on a feature that was part of some index. No, it should
> no longer be required as measures have been implemented to handle this
> automatically.
> 
> See: "The curious case of the zombie annotation" aka UIMA-4049
> 
> https://issues.apache.org/jira/browse/UIMA-4049

  That's great to hear!  However, when reading the bug report and
looking closely at that part of the release notes, I think "it should no
longer be required" isn't quite precise as changing indexed features
might cause an exception to be thrown by an iterator that goes through
these at the same time (so the fix for that is to use a snapshot
iterator, and that sounds reasonable, more so when JCasUtil gets support
for them - sorry if it did and I missed it, I'm still stuck on UIMA 2.6
for now anyway until the next release with fixed CasCopier).

> >  I think that's a bug for the UIMA Tutorial, which mentions FSArray but
> > not FSList.  :-)
> 
> Then I should tell you also about the uimaFIT FSCollectionFactory which
> contains all kinds of helpers to manage FSArray and FSList ;)
> 
> Btw. there is also ArrayFS which is the CAS version of FSArray :P
..
> Did you know that uimaFIT JCasUtil.select() can also be applied to
> FSList and FSArray to avoid casting?
> 
> for (Token t : JCasUtil.select(sentence.getTokens(), Token.class) {
>   ...
> }
> 
> CasUtil.select() can work also on ArrayFS

  So many great news! Thanks so much for these.  We'll certainly start
using them in new code. :-)

-- 
				Petr Baudis
	If you have good ideas, good data and fast computers,
	you can do almost anything. -- Geoffrey Hinton

Mime
View raw message