This reminds me a bit of something I came across today:

Quaere is a extensible framework that adds a querying syntax
    reminiscent of SQL to Java applications. Quaere allows
    developers to filter, enumerate and create projections over a
    number of collections and other queryable resources using a
    common, expressive syntax.

http://andersnoras.com/blogs/anoras/archive/2007/09/11/introducing-quaere-language-integrated-queryies-for-java.aspx


If FSList and FSArray were to implement Iterable, then they could be queried 
with this tool.

I think this would be heading in the right direction.  I view the CAS as a 
little in-memory database, and have often wondered why I can't query it, the 
way I can with other in-memory databases, for example HSQLDB 
(http://hsqldb.sourceforge.net).

So the CAS falls a little short as a database, but I think Quaere or something 
like it (http://josql.sourceforge.net ?) could help.


Greg Holmberg


 -------------- Original message ----------------------
From: Marshall Schor <[EMAIL PROTECTED]>
> Some other concepts to remember when thinking about these things:
> 
> Data in the UIMA CAS is there to be passed between components.  While
> inside one component, you are free to use whatever "native" data
> structures your language (e.g., Java) has.  So, if you were designing a
> component, and needed to insert / remove things in a list, inside one
> component, you could use one of Java's List implementations, or perhaps
> things like HashSets, etc.  When your component finished, and wanted to
> put data into a format for sharing with other components, it could put
> this data into the CAS. 
> 
> List operations typically involve creating / releasing lots of "cons
> cells" (in Lisp terms) or in CAS terms, FSList feature structures. 
> Environments like Java and Lisp and some others come with "garbage
> collection", built in.  But the CAS does not (currently) have "garbage
> collection".  So, if you use FSList operations, and do a lot of new link
> creation **and deletion**, the "deletion" part will not free up any
> space in the CAS.  (Note that this is not an issue if you are using
> FSList operations to only "add" new elements to the list.) 
> 
> The current best practice seems to be to use native data structures to
> do things involving lots of list element updating with deletion, inside
> one component, where possible, and store any results you want
> communicated to other components in the CAS after things stabilize (if
> possible).   (Others may chime in here on their thoughts re: best
> practice :-)
> 
> -Marshall
> 
> Thomas Francart wrote:
> >
> > Hi again UIMA gurus
> >
> > Working with FSList and FSArray in UIMA type systems looks like a lot
> > of fun... :
> >
> > 1. I just can't figure out a way to iterate over a FSList, or
> > NonEmptyFSList... how can I iterate over a feature that is defined as
> > an FSList ? I can't find anything describing this in the documentation
> > anywhere.
> >
> > 2. Similarly, I can iterate over a FSArray, but it looks tedious to
> > add elements into it (what should I do when the array exceeds it size
> > ?) any example of how to do that ?
> >
> > 3. Can anyone provide any quick explanation about the objectives
> > behind the design of the FSList class ? (at least, knowing WHY it is
> > like that would help me to live with it...)
> >
> > Btw, I have added the "improvement of FSArray and FSList" as a
> > suggestion in the UIMA requirements/suggestions wiki.
> >
> > Best
> > Thomas
> >
> >
> > -- 
> > Thomas Francart
> > Mondeca
> > 3, cité Nollez 75018 Paris France
> > Tel: +33 (0)1 44 92 35 04 - Fax: +33 (0)1 44 92 02 59
> > Blog: mondeca.wordpress.com <http://mondeca.wordpress.com>
> > Web: www.mondeca.com <http://www.mondeca.com>
> > Mail: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
> 

Reply via email to