-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem with Name String Array primitive array type during deserialization #257
Conversation
Could you please provide a minimal sample XMI file that cassis fails to parse? |
Also, which version of cassis did you encounter the problem in? |
I tested on these both versions : dkpro-cassis-0.7.1 and dkpro-cassis-0.8.0.dev0. Is there another version that could be probably working for my case? |
I provide you an example who didn't work for me without my change. It concerns the typesystem.xml above all (I suppose) |
I have not looked at it in detail yet, but if I remember correctly, the place where you added the string array handling is about inlined arrays in the form
must be used - which is done in a slightly different part of the code where we walk the XML element tree. |
The typesystem I provided you was generated by Inception. When I keep the string array element inside the typesystem, the parser crashes even if my xmi file doesn't have any string array annotation. If I remove it, the parser works. |
So the problem here seems to be that
... another of the XMI oddities ... I need to check how UIMA treats this in the Java implementation to decide how to treat it in cassis. |
I tried to use a previous version of cassis. And version 0.5.3 seems to work with string array. The only difference is type checking :
Maybe it lacks some additional checking for primitive arrays? |
We don't have a case of an emtpy string array in our test suite so far. So they need to be updated to include such a case. As for reading: your change works, but IMHO it goes to far. It works because it splits an empty attribute value and then creates an empty array from that. The only thing we should support there is if the attribute is empty, then create an empty string. If the attribute is not empty, then we have a bug because that case should be handled elsewhere. And then we need to check if writing empty string arrays using cassis works properly... |
We have an issue for this now: Empty string arrays are not supported #258 |
- Extend test data to cover empty string array - Fix parsing empty string array from XMI - Fix serializing empty string array to XMI
I had a problem when I parse XMI and typesystem containing String Array primitive type. The parser gave me the following error :
I modified the code to accept and parse String Array type as the all Primitive Array type inside the method.
Is it the right place to get able to process String Array type, or is it against the UIMA CAS format philosophy (I'm not an expert)?
Thanks in advance 🤗