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

Span reference query error #61

Open
margaretha opened this issue Jul 18, 2019 · 0 comments
Open

Span reference query error #61

margaretha opened this issue Jul 18, 2019 · 0 comments
Assignees
Labels

Comments

@margaretha
Copy link
Contributor

Krill fails to process the following Annis query and throws HTTP error code 500:

"ich" & pos="VVFIN" & #1 ->malt/d[func="SUBJ"] #2 & #1 . #2

The error message is:

java.lang.IllegalArgumentException: Class number must be bigger than 0.
	at de.ids_mannheim.korap.query.wrap.SpanReferenceQueryWrapper.(SpanReferenceQueryWrapper.java:29)
	at de.ids_mannheim.korap.KrillQuery._operationReferenceFromJSON(KrillQuery.java:506)
	at de.ids_mannheim.korap.KrillQuery._groupFromJson(KrillQuery.java:415)
	at de.ids_mannheim.korap.KrillQuery._fromKoral(KrillQuery.java:237)
	at de.ids_mannheim.korap.KrillQuery._fromKoral(KrillQuery.java:221)
	at de.ids_mannheim.korap.KrillQuery.fromKoral(KrillQuery.java:217)
	at de.ids_mannheim.korap.Krill.fromKoral(Krill.java:165)
	at de.ids_mannheim.korap.Krill.fromKoral(Krill.java:137)

The corresponding Koral query is shown below.

{
    "query": {
        "operands": [
            {
                "operands": [{
                    "operands": [
                        {
                            "operands": [{
                                "@type": "koral:token",
                                "wrap": {
                                    "@type": "koral:term",
                                    "match": "match:eq",
                                    "layer": "orth",
                                    "key": "ich"
                                }
                            }],
                            "classOut": 129,
                            "@type": "koral:group",
                            "operation": "operation:class"
                        },
                        {
                            "operands": [{
                                "@type": "koral:token",
                                "wrap": {
                                    "@type": "koral:term",
                                    "match": "match:eq",
                                    "layer": "p",
                                    "key": "VVFIN"
                                }
                            }],
                            "classOut": 130,
                            "@type": "koral:group",
                            "operation": "operation:class"
                        }
                    ],
                    "@type": "koral:group",
                    "relType": {
                        "@type": "koral:relation",
                        "wrap": {
                            "foundry": "malt",
                            "@type": "koral:term",
                            "match": "match:eq",
                            "layer": "d",
                            "key": "SUBJ"
                        }
                    },
                    "operation": "operation:relation"
                }],
                "@type": "koral:reference",
                "operation": "operation:focus",
                "classRef": [129]
            },
            {
                "@type": "koral:reference",
                "operation": "operation:focus",
                "classRef": [130]
            }
        ],
        "@type": "koral:group",
        "inOrder": true,
        "operation": "operation:sequence"
    },
    "@context": "http://korap.ids-mannheim.de/ns/koral/0.3/context.jsonld"
}
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