commit | e20383224d88cb02a65cb800e9cf196588d1d3cc | [log] [tgz] |
---|---|---|
author | Marc Kupietz <kupietz@ids-mannheim.de> | Thu Mar 04 18:24:02 2021 +0100 |
committer | Marc Kupietz <kupietz@ids-mannheim.de> | Fri Mar 05 00:42:29 2021 +0100 |
tree | 63c5ebc566db11d91779b18447969cead761359b | |
parent | e02fef51e42085feedb8d3f5254c861b9c4721b8 [diff] |
Association score funtions as parameters to collocationScoreQuery also factor out hc_add_onclick_korap_search Change-Id: I48f93761b9bda4e21669a99517c17c55cf3436ee
R client package to access the web service API of the KorAP Corpus Analysis Platform developed at IDS Mannheim
RKorAPClient
uses some R packages with system depencies you might need to install first:
#### Debian / Ubuntu sudo apt install r-base-dev libcurl4-gnutls-dev libxml2-dev libsodium-dev #### Fedora / CentOS >= 8 / RHEL >= 8 sudo dnf install R-devel libcurl-devel openssl-devel libxml2-devel libsodium-devel #### CentOS < 8 / RHEL < 8 sudo yum install R-devel libcurl-devel openssl-devel libxml2-devel libsodium-devel #### Arch Linux pacman -S base-devel gcc-fortran libsodium curl
install.packages("RKorAPClient")
devtools::install_github("KorAP/RKorAPClient") remotes::install_github("KorAP/RKorAPClient") devtools::install_git("https://korap.ids-mannheim.de/gerrit/KorAP/RKorAPClient") remotes::install_git("https://korap.ids-mannheim.de/gerrit/KorAP/RKorAPClient")
library(RKorAPClient) new("KorAPConnection", verbose=TRUE) %>% corpusQuery("Hello world") %>% fetchAll()
library(RKorAPClient) library(ggplot2) kco <- new("KorAPConnection", verbose=TRUE) expand_grid(condition = c("textDomain = /Wirtschaft.*/", "textDomain != /Wirtschaft.*/"), year = (2002:2018)) %>% cbind(frequencyQuery(kco, "[tt/l=Heuschrecke]", paste0(.$condition," & pubDate in ", .$year))) %>% ipm() %>% ggplot(aes(x = year, y = ipm, fill = condition, colour = condition)) + geom_freq_by_year_ci()
See the Highcharts license notes below.
library(RKorAPClient) query = c("macht []{0,3} Sinn", "ergibt []{0,3} Sinn") years = c(1980:2010) as.alternatives = TRUE vc = "textType = /Zeit.*/ & pubDate in" new("KorAPConnection", verbose=T) %>% frequencyQuery(query, paste(vc, years), as.alternatives = as.alternatives) %>% hc_freq_by_year_ci(as.alternatives)
More elaborate R scripts demonstrating the use of the package can be found in the demo folder.
Authors: Marc Kupietz, Nils Diewald
Copyright (c) 2020, Leibniz Institute for the German Language, Mannheim, Germany
This package is developed as part of the KorAP Corpus Analysis Platform at the Leibniz Institute for German Language (IDS).
It is published under the BSD-2 License.
RKorAPClient imports parts of the highcharter package which has a dependency on Highcharts, a commercial JavaScript charting library. Highcharts offers both a commercial license as well as a free non-commercial license. Please review the licensing options and terms before using the highcharter plot options, as the RKorAPClient
license neither provides nor implies a license for Highcharts.
Highcharts is a Highsoft product which is not free for commercial and governmental use.
By using RKorAPClient you agree to the respective terms of use of the accessed KorAP API services which will be printed upon opening a connection (new("KorAPConnection", ...
).
Contributions are very welcome!
Your contributions should ideally be committed via our Gerrit server to facilitate reviewing (see Gerrit Code Review - A Quick Introduction if you are not familiar with Gerrit). However, we are also happy to accept comments and pull requests via GitHub.
Please note that unless you explicitly state otherwise any contribution intentionally submitted for inclusion into this software shall – as this software itself – be under the BSD-2 License.
Kupietz, Marc / Margaretha, Eliza / Diewald, Nils / Lüngen, Harald / Fankhauser, Peter (2019): What’s New in EuReCo? Interoperability, Comparable Corpora, Licensing. In: Bański, Piotr/Barbaresi, Adrien/Biber, Hanno/Breiteneder, Evelyn/Clematide, Simon/Kupietz, Marc/Lüngen, Harald/Iliadi, Caroline (eds.): Proceedings of the International Corpus Linguistics Conference 2019 Workshop "Challenges in the Management of Large Corpora (CMLC-7)", 22nd of July Mannheim: Leibniz-Institut für Deutsche Sprache, 33-39.
Kupietz, Marc / Diewald, Nils / Margaretha, Eliza (2020): RKorAPClient: An R package for accessing the German Reference Corpus DeReKo via KorAP. In: Calzolari, Nicoletta, Frédéric Béchet, Philippe Blache, Khalid Choukri, Christopher Cieri, Thierry Declerck, Sara Goggi, Hitoshi Isahara, Bente Maegaard, Joseph Mariani, Hélène Mazo, Asuncion Moreno, Jan Odijk, Stelios Piperidis (eds.): Proceedings of The 12th Language Resources and Evaluation Conference (LREC 2020). Marseille: European Language Resources Association (ELRA), 7017-7023.