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

Sort order for selects and indexes #247

Open
reckart opened this issue Dec 17, 2021 · 0 comments
Open

Sort order for selects and indexes #247

reckart opened this issue Dec 17, 2021 · 0 comments
Assignees
Labels
Milestone

Comments

@reckart
Copy link
Member

reckart commented Dec 17, 2021

Describe the bug
The normal sort order for selects and annotation indexes in UIMA is begin (asc) end (desc). However, cassis sorts begin (asc) end (asc) and when a select returns multiple types, one type block comes after the other instead of the results being sorted by offsets.

To Reproduce

    xmi = """<?xml version="1.0" encoding="UTF-8"?>
        <xmi:XMI xmlns:xmi="http://www.omg.org/XMI" xmlns:tcas="http:///uima/tcas.ecore" 
            xmlns:cas="http:///uima/cas.ecore" xmi:version="2.0"> 
            <cas:NULL xmi:id="0" /> 
            <tcas:DocumentAnnotation xmi:id="2" sofa="1" begin="0" end="4" language="en" /> 
            <tcas:Annotation xmi:id="3" sofa="1" begin="100" end="200" /> 
            <cas:Sofa xmi:id="1" sofaNum="1" sofaID="_InitialView" mimeType="text" sofaString="Test" /> 
            <cas:View sofa="1" members="2 3" />
        </xmi:XMI>"""

    cas = load_cas_from_xmi(xmi)
    for a in cas.select(TYPE_NAME_ANNOTATION))
        print(a)   

This shows Annotation before DocumentAnnotation

Expected behavior
select results should be sorted by begin (asc) end (desc) - at least for annotations.

Please complete the following information:

  • Version: 0.7.0
@reckart reckart added this to the Backlog milestone Dec 17, 2021
@jcklie jcklie modified the milestones: Backlog, 0.8.0 Dec 17, 2021
@jcklie jcklie self-assigned this Dec 17, 2021
@reckart reckart modified the milestones: 0.9.0, Backlog Feb 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants