You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
presumably because one snippet is selected by chance as "example" that does not follow the structure of the line above, found at least one prove (only trailing part shown):
Searching "(contains(<base/s=s>, (beeinflussen []{0,4} [tt/l=nachhaltig] | [tt/l=nachhaltig] []{0,4} beeinflussen)))" in "textType = /[^:][Zz]eit./ & availability!=QAO-NC-LOC:ids & pubPlaceKey=DE & pubDate since 1975 & pubDate until 1981": 18 hits, took 5.587511354 s
500 KorAP API request failed
Error in purrr::pmap():
ℹ In index: 3.
Caused by error in out[i] <- if (matchOnly) { gsub(".*<mark>(.+)</mark>.*", "\\1", example) } else { stringr::str_replace(example, "<[^>]*>", "") }:
! Ersetzung hat Länge 0
Run rlang::last_trace() to see where the error occurred.
bug in:
https://github.com/KorAP/RKorAPClient/blob/master/R/collocationAnalysis.R
presumably in line:
335 '<span class="context-left">(<span class="more"></span>)?(.*[^ ]) *</span><span class="match"><mark>.*</mark></span><span class="context-right"> *([^<]*)'
error not deterministic, not reproducable
presumably because one snippet is selected by chance as "example" that does not follow the structure of the line above, found at least one prove (only trailing part shown):
S78/AUG/00081:
.. </mark><span class="cutted"></span></span><span class="context-right">
suggested change (minimal, should be cross-checked with dtd of the structure):
'<span class="context-left">(<span class="more"></span>)?(.*[^ ]) *</span><span class="match"><mark>.*</mark>(<span class="cutted"></span>)?</span><span class="context-right"> *([^<]*)'
occurred when running following script:
...
QUERY = c("nachhaltig")
LNQ <- TRUE
VC <- c("textType = /[^:][Zz]eit./ & availability!=QAO-NC-LOC:ids & pubPlaceKey=DE & pubDate since 1975 & pubDate until 1981")
df <- collocationAnalysis(
kco,
node = QUERY,
vc = VC,
lemmatizeNodeQuery = LNQ,
lemmatizeCollocateQuery = FALSE,
leftContextSize = 5,
rightContextSize = 5,
withinSpan = "base/s=s",
searchHitsSampleLimit = 40000,
topCollocatesLimit = -1
)
...
-->
Searching "(contains(<base/s=s>, (beeinflussen []{0,4} [tt/l=nachhaltig] | [tt/l=nachhaltig] []{0,4} beeinflussen)))" in "textType = /[^:][Zz]eit./ & availability!=QAO-NC-LOC:ids & pubPlaceKey=DE & pubDate since 1975 & pubDate until 1981": 18 hits, took 5.587511354 s
500 KorAP API request failed
Error in
purrr::pmap()
:ℹ In index: 3.
Caused by error in
out[i] <- if (matchOnly) { gsub(".*<mark>(.+)</mark>.*", "\\1", example) } else { stringr::str_replace(example, "<[^>]*>", "") }
:! Ersetzung hat Länge 0
Run
rlang::last_trace()
to see where the error occurred.Backtrace:
▆
├─base::source("~/R-dev/collocateRankSeriesDynamicSpans.R", echo = TRUE)
│ ├─base::withVisible(eval(ei, envir))
│ └─base::eval(ei, envir)
│ └─base::eval(ei, envir)
├─RKorAPClient::collocationAnalysis(...) at ~/R-dev/collocateRankSeriesDynamicSpans.R:97:3
├─RKorAPClient::collocationAnalysis(...)
│ └─RKorAPClient (local) .local(kco, ...)
│ ├─... %>% bind_rows()
│ └─purrr::pmap(...)
│ └─purrr:::pmap_("list", .l, .f, ..., .progress = .progress)
│ ├─purrr:::with_indexed_errors(...)
│ │ └─base::withCallingHandlers(...)
│ ├─purrr:::call_with_cleanup(...)
│ └─RKorAPClient (local) .f(node = .l[[1L]][[i]], vc = .l[[2L]][[i]], ...)
│ ├─RKorAPClient::collocationAnalysis(...)
│ └─RKorAPClient::collocationAnalysis(...)
│ └─RKorAPClient (local) .local(kco, ...)
│ └─RKorAPClient:::findExample(kco, query = result$query, vc = result$vc)
└─dplyr::bind_rows(.)
└─rlang::list2(...)
Run rlang::last_trace(drop = FALSE) to see 4 hidden frames.
└─base::.handleSimpleError(...)
└─purrr (local) h(simpleError(msg, call))
after clearing cache worked fine and continued to
Searching "(contains(<base/s=s>, (beeinflußt []{0,4} [tt/l=nachhaltig] | [tt/l=nachhaltig] []{0,4} beeinflußt)))" in "textType = /[^:][Zz]eit./ & availability!=QAO-NC-LOC:ids & pubPlaceKey=DE & pubDate since 1975 & pubDate until 1981": 16 hits, took 5.278042045 s
Retrieved page 1/1 in 5.328346217 s
The text was updated successfully, but these errors were encountered: