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

corpusQuery should have a context size parameter to controll snippet lengths #11

Closed
kupietz opened this issue Jan 19, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@kupietz
Copy link
Member

kupietz commented Jan 19, 2023

It'supported by the API: https://github.com/KorAP/Kustvakt/wiki/Service:-Search-GET

Thanks @ Antonina!

@kupietz kupietz added the enhancement New feature or request label Jan 19, 2023
@kupietz
Copy link
Member Author

kupietz commented Jan 19, 2023

Untill this is fixed you can patch KorAPQuery.R yourself, for example:

diff --git a/R/KorAPQuery.R b/R/KorAPQuery.R
index 3ce4773..0809770 100644
--- a/R/KorAPQuery.R
+++ b/R/KorAPQuery.R
@@ -169,6 +169,7 @@ setMethod("corpusQuery", "KorAPConnection",
       request <-
         paste0('?q=',
                URLencode(query, reserved = TRUE),
+               '&context=12-token,12-token',
                if (vc != '') paste0('&cq=', URLencode(vc, reserved = TRUE)) else '', '&ql=', ql)
       webUIRequestUrl <- paste0(kco@KorAPUrl, request)
       requestUrl <- paste0(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant