Back to your original question:
> I'd like to release it as an open source project, but wanted to get
> feedback from the good uima folks at apache & ibm first. Some
> possibilities include: (a) releasing it as a standalone project; (b)
> incorporating it into the main UIMA project; and (c) adding it under
> the "corpus reader" subpackage of nltk (http://nltk.org). (The name
> "pycas" could be changed as well -- I picked it by analogy with jcas.)
Enabling use of NLTK with UIMA looks like a great opportunity for the
UIMA community. The SWIG'd Python enablement would presumably be able
to do that, but given your comments about SWIG creating an unnatural
interface, we would be crazy not to want to take advantage of your new
native pycas implementation.
Adding it to the main UIMA project would enable other UIMA developers
to easily contribute to the UIMA-AS integration. It would cause
slightly more difficulty for you, as your updates would have be
submitted as patch files via jira, at least initially; if you were to
continue having interest in UIMA and contributing to this code, it
would make sense to make you a UIMA committer.
If you want to pursue option b, I would be happy to start a vote to
accept this into the UIMA sandbox.
> Thanks for pointing these files out. I fixed a couple minor bugs and
> now pycas can read both the files you listed.
Are these changes in the latest zip file? I downloaded and tried
again, getting a slightly different error trace:
>>> cas = pycas.xml.load_cas('cas.xml', 'testTypeSystem.xml')
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "pycas\xml.py", line 252, in load_cas
return parse_cas(etree, type_system, type_order)
File "pycas\xml.py", line 315, in parse_cas
_xcas_parse_fs_attribs(elt, fs, id_map, xcas_index)
File "pycas\xml.py", line 367, in _xcas_parse_fs_attribs
setattr(fs, fname[len(_XCAS_REF):], id_map.get(fval))
File "pycas\types.py", line 897, in __setattr__
object.__setattr__(self, attr, val)
File "pycas\types.py", line 791, in __set__
val = range_type.coerce(val, obj.cas)
File "pycas\types.py", line 1199, in coerce
for elt in reversed(list(val)):
TypeError: iteration over non-sequence
Thanks,
Eddie