Skip to content

ResultOrder::Normal fails when there is no annis::tok annotation #310

@MartinKl

Description

@MartinKl

DISCLAIMER: Not sure this is intended behaviour, it's certainly unexpected.

When a CorpusStorage is asked to return results in ResultOrder::Normal, this will fail when there is no annotation annis::tok. The results are returned in what appears to be alphabetical order. See the following examples:

With annis::tok, find pos returns the following in graphANNIS CLI (which is set to provide normal order, I checked):

test> find pos
...
21:20:54 [INFO] Executed query in 10 ms
pos::test/test#t1
pos::test/test#t2
pos::test/test#t3
pos::test/test#t4
pos::test/test#t5
pos::test/test#t6
pos::test/test#t7
pos::test/test#t8
pos::test/test#t9
pos::test/test#t10

For the same data, but changing the table header such that there is no annis::tok column leads to the following result for the same query:

test> find pos
...
21:18:44 [INFO] Executed query in 11 ms
pos::test/test#t1
pos::test/test#t10
pos::test/test#t2
pos::test/test#t3
pos::test/test#t4
pos::test/test#t5
pos::test/test#t6
pos::test/test#t7
pos::test/test#t8
pos::test/test#t9

The nodes are certainly ordered by Ordering/annis, they are also Coverage terminals, they just lack an annis::tok annotation. I attach all files for test with annatto 0.19.0. For testing the variation in behaviour just change the column header accordingly.
test-data.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions