Sync version numbering with CRAN release of v0.5.6

Change-Id: Id45d89043d3c56181b5039b28caa8967405bd55e
2 files changed
tree: 05779b137d6dcce1e768ab065eff0e1d0c1996b2
  1. .github/
  2. demo/
  3. man/
  4. R/
  5. .gitignore
  6. .Rbuildignore
  7. cran-comments.md
  8. DESCRIPTION
  9. LICENSE
  10. LICENSE.md
  11. NAMESPACE
  12. NEWS.md
  13. Readme.md
  14. RKorAPClient.Rproj
Readme.md

KorAP web service client package for R

Description

Simple R package to access the web service API of the KorAP Corpus Analysis Platform developed at the IDS Mannheim

This package is in its early stages and not stable yet! In particular, please expect that, at this early stage, objects, functions, parameters as well as their names or identifiers will still change continuously without any notification. Use it on your own risk!

Getting started

At this point there is no binary package on CRAN yet, so you have to install the development version from our Gerrit server using the devtools package:

# install.packages("devtools")
library(devtools)
install_git("https://korap.ids-mannheim.de/gerrit/KorAP/RKorAPClient") 
library(RKorAPClient)
?corpusQuery
?frequencyQuery

Hello world

library(RKorAPClient)
new("KorAPConnection", verbose=TRUE) %>% corpusQuery("Hello world") %>% fetchAll()

Examples

Frequencies over time and domains using ggplot2

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()

Percentages over time using highcharter

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)

Proportion of "ergibt … Sinn"  versus "macht … Sinn" between 1980 and 2010 in newspapers and magazines

Demos

More elaborate R scripts demonstrating the use of the package can be found in the demo folder.

Development and License

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.

Contributions

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.

References