Git Product home page Git Product logo

rkorapclient's People

Contributors

akron avatar elenairimia avatar kupietz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

rkorapclient's Issues

In the case of timeouts, frequencies should be estimated and marked as such

At the moment, the warnings are formulated rather unspecifically:

682: Response time exceeded

and do not point out the consequences.

The frequency values in the case of timeouts are currently not to be understood as estimates, but as lower bounds - without this being explicit.

Estimating frequencies probably also requires changes in Krill.

Memoize totalResults instead of rerequesting

In https://github.com/KorAP/RKorAPClient/blob/master/R/KorAPQuery.R#L278-L289 the totalResults count will be requested for each and every page. While this may be cached in the backend there is no guarantee for it - meaning the number of potential matches may be calculated over and over again.

By adding the cutoff parameter for all subsequent requests it is ensured that the query will stop once all requested items are found and ignoring total results. See https://github.com/KorAP/Kalamar-Plugin-Export/blob/master/src/main/java/de/ids_mannheim/korap/plkexport/Service.java#L319 .

recursiveCA demo: Error in `slice_head()`

> demo("recursiveCA")

Error in `slice_head()`:
! `n` must be explicitly named.Did you mean `slice_head(n = 50)`?
Run `rlang::last_error()` to see where the error occurred.

Allow users to (O-)authorize client applications on the fly via a browser window

The current procedure requires users to generate an access token themselves and in advance in their KorAP OAuth-settings, to copy the token and to store it in their keyring using RKorAPClient::persistAccessToken(kco, accessToken="<token>") or to pass it with each new("KorAPConnection", accesToken = "<token>").

It would be nice if also client applications could initiate the authorization process, using httr::oauth_endpoint(), httr::oauth_app(), so that with httr::oauth2.0_token() the client application can open a browser window where the user is asked to grant KorAP-access to it and which, in the case of success, sends the access token to the client package callback function, listening by default on http://localhost:1410 (as described, e.g. in this R-hub blog post).

I think this is the standard procedure now (exemplified in the httr package for Google, GitHub, Facebook, Vimeo, ...) and we do already have most if not all the functionality provided by Kustvakt, maybe lacking not much more than a page in Kalamar that asks the user to grant the access.

To get an idea, how this should look like, you can try the googldrive package that provides a built-in fallback OAuth app:

library("googledrive")
drive_find(n_max = 30)

After logging in this open the following access request:
Bildschirmfoto von 2021-09-07 16-25-49

We can discuss if we also want have such a built-in fallback app. See the discussion on the security risk here.

Collocation analysis is incompatible with R 4.3.0

error message:

Error in is.na(left) || is.na(right) : 
  'length = 5' in coercion to 'logical(1)'
Called from: snippet2FreqTable(s, leftContextSize = leftContextSize, rightContextSize = rightContextSize, 
    collocateFilterRegex = collocateFilterRegex, oldTable = oldTable, 
    stopwords = stopwords)

this is because of the change:

CHANGES IN R 4.3.0 SIGNIFICANT USER-VISIBLE CHANGES

Calling ‘&&’ or ‘||’ with LHS or (if evaluated) RHS of length greater than one is now always an error, with a report of the form
'length = 4' in coercion to 'logical(1)'

See https://developer.r-project.org/blosxom.cgi/R-devel/NEWS/2023/03/24

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.