commit | 21add44ec0fb2ca57876f2c8188e9540b05c428f | [log] [tgz] |
---|---|---|
author | dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> | Fri Dec 06 17:09:08 2024 +0000 |
committer | Marc Kupietz <kupietz@ids-mannheim.de> | Fri Dec 13 16:49:38 2024 +0100 |
tree | c134e84bb9312b65df942a57b501f05aa80f6b80 | |
parent | 0a5a62f4b01f60a703078d04d96e589b6b2849ab [diff] |
Bump eu.clarin.sru.fcs:fcs-simple-endpoint from 1.7.0 to 1.8.0 Bumps [eu.clarin.sru.fcs:fcs-simple-endpoint](https://github.com/clarin-eric/fcs-simple-endpoint) from 1.7.0 to 1.8.0. - [Changelog](https://github.com/clarin-eric/fcs-simple-endpoint/blob/main/CHANGELOG.md) - [Commits](https://github.com/clarin-eric/fcs-simple-endpoint/compare/FCSSimpleEndpoint-1.7.0...FCSSimpleEndpoint-1.8.0) Change-Id: Iacd4120d54dcd7273ef1e25662e8c3e659d143cf --- updated-dependencies: - dependency-name: eu.clarin.sru.fcs:fcs-simple-endpoint dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Closes #217 Change-Id: Ie31d89c50f1aaa9355fbfb45cbf3053365718153 Reviewed-on: https://korap.ids-mannheim.de/gerrit/c/KorAP/Koral/+/9099 Reviewed-by: Marc Kupietz <kupietz@ids-mannheim.de>
Koral is a translator tool for converting different corpus query languages to KoralQuery, a JSON-LD-based protocol for the common representation of linguistic queries. KoralQuery specifications are described extensively in Bingel (2015). This work has been carried out within the KorAP project.
Koral supports the following corpus query languages (QLs):
You can use the main class QuerySerializer to translate and serialize queries. Valid QL identifiers are cosmas2
, annis
, poliqarp
, poliqarpplus
, cql
, cqp
, and fcsql
.
import de.ids_mannheim.korap.query.serialize.QuerySerialzer; QuerySerializer qs = new QuerySerializer(); String query = "contains(<s>,[orth=zu][pos=ADJA])"; qs.setQuery(query, "poliqarpplus"); System.out.println(qs.toJSON());
This will print out the following JSON-LD string for the Koralized query. The query asks for a sentence element (<s>
) contained in a sequence of the surface form zu and a token with the part-of-speech tag ADJA. In the KoralQuery string, a containment relation is defined over two operands, an s span and a sequence of two tokens.
{ "@context": "http://korap.ids-mannheim.de/ns/KoralQuery/v0.2/context.jsonld", "query": { "@type": "koral:group", "operation": "operation:position", "frames": [ "frames:isAround" ], "operands": [ { "@type": "koral:span", "key": "s" }, { "@type": "koral:group", "operation": "operation:sequence", "operands": [ { "@type": "koral:token", "wrap": { "@type": "koral:term", "layer": "orth", "key": "zu", "match": "match:eq" } }, { "@type": "koral:token", "wrap": { "@type": "koral:term", "layer": "pos", "key": "ADJA", "match": "match:eq" } } ] } ] } }
Koral allows designing and implementating corpus query systems independent of any specific query languages. The systems only need to have Koral translate a query to a KoralQuery (see usage) and feed the translated query to their search engine. Several query languages can be supported without further adjustments to the search engine.
Koral and KoralQuery have been designed and developed within the KorAP Project, and are used in KorAP to translate queries to a common format before sending them to its search engine.
Setup is straightforward (Maven3 required):
git clone https://github.com/korap/Koral [install-dir] cd [install-dir] mvn test -Dhttps.protocols=TLSv1.2 mvn package
There is also a command line version. After setup, simply run
java -jar target/Koral-0.2.jar [query] [queryLanguage]
Build a Koral library and install it in your local Maven repository (needed for Kustvakt)
mvn install -Dhttps.protocols=TLSv1.2
To update an existing installation, pull the latest version at [install-dir]
git pull origin master
Afterwards, rerun the test suite and package or install the library.
J. Bingel, "Instantiation and implementation of a corpus query lingua franca," M.S. thesis, University of Heidelberg, Heidelberg, 2015.
J. Bingel and N. Diewald, "KoralQuery – a General Corpus Query Protocol," in Proceedings of the Workshop on Innovative Corpus Query and Visualization Tools at NODALIDA 2015, Vilnius, 2015, pp. 1-5.
Koral and KoralQuery were developed by Joachim Bingel, Nils Diewald, Michael Hanl, Eliza Margaretha, and Franck Bodmer at the Leibniz Institute for the German Language (IDS), member of the Leibniz Association.
The CQP implementation was authored by Elena Irimia.
The ANTLR grammars for parsing ANNIS QL and COSMAS II QL were developed by Thomas Krause (HU Berlin) and Franck Bodmer (IDS Mannheim), respectively. Minor adaptations of those grammars were implemented by the Koral authors.
The authors wish to thank Piotr Bański, Elena Frick and Carsten Schnober for their valuable input.
Koral is published under the BSD-2 License. See also the attached LICENSE.
The ANNIS grammar is licensed under the Apache License 2.0.