5 Sep 21:23
Re: Problem with multiple type identifiers when loading pears
On Sat, Sep 5, 2009 at 5:09 AM, Marshall Schor <msa@...> wrote: > > Can you say a bit more what the problem is? > I think my problem is actually tangential to the issue with JCasRegistry. After retrieving types from the jcas TypeSystem, I still ran into issues with multiple Redaction definitions because of multiple copies of the bytecode being loaded (multiple class loaders, I think). I've worked around that -- see below if you're interested. I'd like to hear suggestions to make it cleaner, but at least it's working. I still don't understand why JCasRegistry.register(...) shouldn't be a true function. It seems like there are at least two parallel ways to retrieve types, and in my experience, they don't return the same results--at least when getting filtered annotation indices. (The ways being: JCasRegistry.getClassForIndex(MyAnnotationType.type) and aJCas.getTypeSystem().getTypeByName(MyAnnotationType.class.getType()) Anyhow, here's an overview of what we're doing -- it may shed some light on this issue: The UIMA portion of our application is a self-contained module (lets call it 'core') that (once instantiated) takes a Document as input, and returns a Collection<Violation>. Violations are moderately complex data structures that contain the fields of an Annotation object -- specifically, a Redaction (Redaction is a JCasGen-generated annotation subtype with some minor additional metadata that the Annotators populate).(Continue reading)
RSS Feed