query_corpus: Query corpus

Description Usage Arguments Value Examples

View source: R/query_processing.R

Description

query_corpus performs a cqp_query and returns a list of position values. If s_attr and s_attr_values are provided, restricts query to structural attributes with given values.

Usage

1
query_corpus(cqp_corpus, cqp_query, sattr = NULL, sattr_values = NULL)

Arguments

cqp_query

character with cqp query string.

sattr

character specifying s-attribute.

sattr_values

vector of s-attribute values.

corpus

corpus created with get_corpus.

Value

list of class query_result with match and matchend position values.

Examples

1
## Not run: query_corpus(my_corpus, '[word = "crisis"]')

wiertz/rusecqp documentation built on Feb. 9, 2022, 1:30 p.m.