forked from PolMine/RcppCWB
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcqp_query.Rd
More file actions
54 lines (47 loc) · 1.54 KB
/
Copy pathcqp_query.Rd
File metadata and controls
54 lines (47 loc) · 1.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/cqp.R
\name{cqp_query}
\alias{cqp_query}
\alias{cqp_dump_subcorpus}
\alias{cqp_subcorpus_size}
\alias{cqp_list_subcorpora}
\alias{cqp_drop_subcorpus}
\title{Execute CQP Query and Retrieve Results.}
\usage{
cqp_query(corpus, query, subcorpus = "QUERY")
cqp_dump_subcorpus(corpus, subcorpus = "QUERY")
cqp_subcorpus_size(corpus, subcorpus = "QUERY")
cqp_list_subcorpora(corpus)
cqp_drop_subcorpus(corpus)
}
\arguments{
\item{corpus}{a CWB corpus}
\item{query}{a CQP query}
\item{subcorpus}{subcorpus name}
}
\description{
Using CQP queries requires a two-step procedure: At first, you execute a
query using \code{cqp_query}. Then, \code{cqp_dump_subcorpus} will return a
matrix with the regions of the matches for the query.
}
\details{
The \code{cqp_query} function executes a CQP query. The
\code{cqp_subcorpus_size} function returns the number of matches for the CQP
query. The \code{cqp_dump_subcorpus} function will return a two-column matrix
with the left and right corpus positions of the matches for the CQP query.
}
\examples{
cqp_query(corpus = "REUTERS", query = '"oil";')
cqp_subcorpus_size("REUTERS")
cqp_dump_subcorpus("REUTERS")
cqp_query(corpus = "REUTERS", query = '"crude" "oil";')
cqp_subcorpus_size("REUTERS", subcorpus = "QUERY")
cqp_dump_subcorpus("REUTERS")
}
\references{
Evert, S. 2005. The CQP Query Language Tutorial. Available online at
\url{https://cwb.sourceforge.io/files/CWB_Encoding_Tutorial.pdf}
}
\author{
Andreas Blaette, Bernard Desgraupes, Sylvain Loiseau
}