graphANNIS icon indicating copy to clipboard operation
graphANNIS copied to clipboard

`ResultOrder::Normal` fails when there is no annis::tok annotation

Open MartinKl opened this issue 1 year ago • 1 comments

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

MartinKl avatar Dec 13 '24 21:12 MartinKl

Just for clarification: When I say the nodes are Coverage terminals, I mean it in the sense that there are no outgoing Coverage edges. The component itself is actually empty here.

MartinKl avatar Dec 15 '24 20:12 MartinKl