I thought that in #1515, we fixed kwics to plot (in textplot_xray()) by dictionary key, not value. But it appears to be faceting on values, not keys.
library("quanteda")
## Package version: 1.4.4
# one facet per value
dict <- dictionary(list(
preps = c("to", "of", "for"),
articles = c("the", "an", "an")
))
corp <- corpus_subset(data_corpus_inaugural, Year %in% c(1945, 1865))
kwicdict <- kwic(corp, pattern = dict)
textplot_xray(kwicdict)

# one facet per key
tokens(corp) %>%
tokens_lookup(dictionary = dict, exclusive = FALSE, capkeys = TRUE) %>%
kwic(pattern = char_toupper(names(dict))) %>%
textplot_xray()

Is that what we intended? The second form is not likely to be easy for users to apply.
I thought that in #1515, we fixed kwics to plot (in
textplot_xray()) by dictionary key, not value. But it appears to be faceting on values, not keys.Is that what we intended? The second form is not likely to be easy for users to apply.