Skip to content
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

Type system in exported JSON should be minimized #3422

Closed
reckart opened this issue Oct 4, 2022 · 5 comments
Closed

Type system in exported JSON should be minimized #3422

reckart opened this issue Oct 4, 2022 · 5 comments
Assignees
Labels
Milestone

Comments

@reckart
Copy link
Member

reckart commented Oct 4, 2022

By default, only a minimal type system should be included (i.e. one that covers only the types actually used in the respective JSON file). However, I didn't have the time to investigate yet why the included type system is not minimized and if that is a bug/missing setting in INCEpTION or in the underlying UIMA library.

Originally posted by @reckart in #3402 (comment)


@jfiala
Copy link
Contributor

jfiala commented Oct 4, 2022

Maybe you could use a json schema and export that as well in a zip file.
That worked great for me, for XMI (as the TypeSystem.xml is always the same).

@jfiala
Copy link
Contributor

jfiala commented Oct 4, 2022

The type system of exported XMI could be also minimized IMHO - currently it contains TagsetDescription/FeatureDefinition which doesn't seem to be 100% necessary (as it is also contained in the TypeSystem.xml).

Example TagsetDescription:
XMI:

<type3:TagsetDescription xmi:id="307" sofa="1" begin="0" end="0" layer="webanno.custom.BISKOMP" name="Match level" input="false"/>

TypeSystem.xml:

        <typeDescription>
                        
            <name>webanno.custom.BISKOMP</name>
                        
            <description/>
                        
            <supertypeName>uima.tcas.Annotation</supertypeName>
                        
            <features>
                                
                <featureDescription>
                                        
                    <name>identifier</name>
                                        
                    <description/>
                                        
                    <rangeTypeName>uima.cas.String</rangeTypeName>
                                    
                </featureDescription>
                                
...

Example FeatureDefinition:

<type:FeatureDefinition xmi:id="4804" layer="4793" name="quality" uiName="quality"/>

However, feature quality is also described attached to its layer in the TypeSystem.xml:

 <featureDescription>
                                        
                    <name>quality</name>
                                        
                    <description/>
                                        
                    <rangeTypeName>uima.cas.Float</rangeTypeName>
                                    
                </featureDescription>
                            
            </features>

@reckart
Copy link
Member Author

reckart commented Oct 4, 2022

The FeatureDefinition that is included in the XMI is supplemental to the definitions in the UIMA type system. The UIMA type system has no concept of a display name for a feature. It has a description and a name, but no display name. The name of a feature cannot be changed. The display name of a feature can be changed in INCEpTION. Some people had the problem that they had changed the display name in INCEpTION to something wildly different from the name they set during the creation of the feature. Thus, FeatureDefinition was added to provide them with access to the display name.

@jfiala
Copy link
Contributor

jfiala commented Oct 4, 2022

Thanks for the explanation, got it :) (uiName = display name).

@reckart reckart added this to the 26.0 milestone Oct 6, 2022
@reckart reckart added the 🐛Bug Something isn't working label Oct 6, 2022
@reckart reckart modified the milestones: 26.0, 27.0 Nov 5, 2022
@reckart reckart modified the milestones: 27.0, 27.1 Jan 4, 2023
@reckart reckart modified the milestones: 27.1, 27.0 Mar 7, 2023
@reckart reckart self-assigned this Mar 7, 2023
@reckart
Copy link
Member Author

reckart commented Mar 7, 2023

Fixed in e730f72 as part of #3571 .

@reckart reckart closed this as completed Mar 7, 2023
@reckart reckart added this to Kanban Aug 7, 2024
@reckart reckart moved this to 🍹 Done in Kanban Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

No branches or pull requests

2 participants