Get ranges (pairs of left and right corpus positions) for queries.
ranges(.Object, ...)# S4 method for corpus
ranges(
.Object,
query,
cqp = FALSE,
check = TRUE,
p_attribute = "word",
verbose = TRUE,
mc = 1L,
progress = FALSE
)
# S4 method for character
ranges(
.Object,
query,
cqp = FALSE,
check = TRUE,
p_attribute = "word",
verbose = TRUE,
mc = 1L,
progress = FALSE
)
# S4 method for subcorpus
ranges(
.Object,
query,
cqp = FALSE,
check = TRUE,
p_attribute = "word",
verbose = TRUE,
mc = 1L,
progress = FALSE
)
# S4 method for partition
ranges(
.Object,
query,
cqp = FALSE,
check = TRUE,
p_attribute = "word",
verbose = TRUE,
mc = 1L,
progress = FALSE
)
A length-one character
vector indicating a CWB corpus, or a
corpus
, or partition
object.
Used for reasons of backwards compatibility to
process arguments that have been renamed (e.g. pAttribute
).
A character
vector providing one or multiple queries (token to
look up, regular expression or CQP query). Token ids (i.e. integer
values) are also accepted. If query
is neither a regular expression nor a
CQP query, a sanity check removes accidental leading/trailing whitespace,
issuing a respective warning.
Either logical (TRUE
if query is a CQP query), or a function to
check whether query is a CQP query or not (defaults to is.cqp
auxiliary
function).
A logical
value, whether to check validity of CQP query
using check_cqp_query
.
The p-attribute to search. Needs to be stated only if query
is not a CQP query. Defaults to NULL
.
A logical
value, whether to show messages.
If logical
value TRUE
, the value of
getOption("polmineR.cores")
is passed into mclapply
or
pblapply
as the specification of the number of cores to use. It is
also possible to supply an integer value with the number of cores directly.
Defaults to 1 (no multicore). Relevant only if several queries are to be
processed.
A logical
value, whether to show a progess bar when
processing multiple queries.