> > - In XCAS, what exactly is the meaning of the _indexed attrib? I was > assuming that it specified the sofaNum of the sofa that indexes a > given feature structure. But if so, what does "_indexed=0" mean, and > how does that differ from just not having an "_indexed" attribute? > (The only place where I see "_indexed=0" is on sofas.)
_indexed indicates that the FS is indexed in one or more views. "_indexed=0" means that the FS is indexed in view 0, a.k.a. the base CAS. SofaFS are the only FS indexed in view 0, which is just there for internal bookkeeping. > > - From what you said before, the only view that's allowed to not have > a sofa is _InitialView. Does that mean I can assume that a > <cas:View.../> element without a sofa is for the _initialView? And > what should happen if there is more than one <cas:View.../> element > without a sofa? Yes, any view with no sofa should have it's FS added to the _InitialView index. Note that we currently require that cas:View elements must come after all FS in the file. I see that we may be creating an unnecessary dummy view element for the base CAS with just the sofaFS. I'll create an issue to get rid of it; you can just add FS in that element to the _InitialView as well. > > - I assume that the "size" attribs in the XCAS files are not > specifying a feature value, but are just used to allow the > deserializer to preallocate the right amount of space. Can I safely > ignore them? Or should I handle cases like <uima.cas.StringArray > _id="12" size="10"/> where the number of children doesn't match the > size? If this type of mismatch *is* allowed, then I assume I should > fill in a null/0/false value for any elements without corresponding > xml children? "size" is a feature of an array FS. I believe the number of data elements should always match the specified size. Do you have a counter example? > Another related question: in v1MultiSofaCas.xml, what is the > difference between the "sofa" attribute and the "_indexed" attribute? > They seem to always have the same values. If the intent is to set the > "sofa" feature, then it seems odd to use a "sofa" attribute (with a > sofaNum) rather than a "_ref_sofa" attribute (with an xml _id). > Presumably, this "sofa" attribute is a "magic" attribute, to be > treated differently from normal feature atributes? Because I'm not > sure how I would interpret eg a "head" attribute on a list (as opposed > to "_ref_head"). The "v1" XCAS files are from pre-Apache v1.x UIMA code. In v2 the sofa feature in annotations is a reference. The purpose of these files was to test continued backward compatibility for older XCAS files. You should ignore those files. Regards, Eddie
