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

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

Open
MartinKl opened this issue Dec 13, 2024 · 1 comment
Open

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

MartinKl opened this issue Dec 13, 2024 · 1 comment

Comments

@MartinKl
Copy link

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
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant